From e16d9b751d0c6d01d562e0ca3a22ef84d6570f82 Mon Sep 17 00:00:00 2001 From: Azad <49314270+Akmadan23@users.noreply.github.com> Date: Fri, 19 May 2023 21:26:54 +0200 Subject: [PATCH] fix(lsp_definitions): compare file uri with `targetUri` --- lua/telescope/builtin/__lsp.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/telescope/builtin/__lsp.lua b/lua/telescope/builtin/__lsp.lua index 17cf430277..3604e5b6fc 100644 --- a/lua/telescope/builtin/__lsp.lua +++ b/lua/telescope/builtin/__lsp.lua @@ -186,7 +186,8 @@ local function list_or_jump(action, title, opts) if #flattened_results == 0 then return elseif #flattened_results == 1 and opts.jump_type ~= "never" then - if params.textDocument.uri ~= flattened_results[1].uri then + local uri = params.textDocument.uri + if uri ~= flattened_results[1].uri and uri ~= flattened_results[1].targetUri then if opts.jump_type == "tab" then vim.cmd "tabedit" elseif opts.jump_type == "split" then