From c816406bd50ade6ec754474f08974154487d417c Mon Sep 17 00:00:00 2001 From: James Trew <66286082+jamestrew@users.noreply.github.com> Date: Mon, 18 Mar 2024 11:39:57 -0400 Subject: [PATCH] fix(builtin.lsp): bad check for `jump_type` option (#2991) --- lua/telescope/builtin/__lsp.lua | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lua/telescope/builtin/__lsp.lua b/lua/telescope/builtin/__lsp.lua index 2442b9a..3c07d8b 100644 --- a/lua/telescope/builtin/__lsp.lua +++ b/lua/telescope/builtin/__lsp.lua @@ -165,14 +165,11 @@ local function list_or_jump(action, title, params, opts) cmd = "vnew" elseif opts.jump_type == "tab drop" then cmd = "tab drop" - else - utils.notify( - "list_or_jump", - { msg = string.format("Invalid jump_type for %s picker", title), level = "ERROR" } - ) - return end - vim.cmd(string.format("%s %s", cmd, file_path)) + + if cmd then + vim.cmd(string.format("%s %s", cmd, file_path)) + end end vim.lsp.util.jump_to_location(flattened_results[1], offset_encoding, opts.reuse_win)