From 737f8cd6b5a9b987c5fa91aacd477358191e1fb8 Mon Sep 17 00:00:00 2001 From: Simon Hauser Date: Fri, 22 Jul 2022 17:52:41 +0200 Subject: [PATCH] fix: `Telescope` command lsp_definition call (and potentially more) (#2086) --- lua/telescope/builtin/__internal.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/telescope/builtin/__internal.lua b/lua/telescope/builtin/__internal.lua index 79e67e4..5012127 100644 --- a/lua/telescope/builtin/__internal.lua +++ b/lua/telescope/builtin/__internal.lua @@ -83,7 +83,7 @@ internal.builtin = function(opts) previewer = previewers.builtin.new(opts), sorter = conf.generic_sorter(opts), attach_mappings = function(_) - actions.select_default:replace(function(_) + actions.select_default:replace(function(prompt_bufnr) local selection = action_state.get_selected_entry() if not selection then utils.__warn_no_selection "builtin.builtin" @@ -98,6 +98,7 @@ internal.builtin = function(opts) picker_opts = opts end + actions.close(prompt_bufnr) if string.match(selection.text, " : ") then -- Call appropriate function from extensions local split_string = vim.split(selection.text, " : ")