summaryrefslogtreecommitdiff
path: root/lua/telescope/builtin/internal.lua
diff options
context:
space:
mode:
authorkylo252 <59826753+kylo252@users.noreply.github.com>2022-04-22 16:13:32 +0200
committerGitHub <noreply@github.com>2022-04-22 16:13:32 +0200
commitcc1a3440f9ba6f28a8ca0bfff867f60c2d80c353 (patch)
tree965bd4cb118219c3f45dfdd7442379938f849938 /lua/telescope/builtin/internal.lua
parent5a58b1f53577a8e124d703b5f8f3a29d07416753 (diff)
fix: fix keep insert when going from telescope window to telescope window (#1600)
Also fixes `initial_mode` Co-authored-by: Simon Hauser <Simon-Hauser@outlook.de>
Diffstat (limited to 'lua/telescope/builtin/internal.lua')
-rw-r--r--lua/telescope/builtin/internal.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/lua/telescope/builtin/internal.lua b/lua/telescope/builtin/internal.lua
index 1421775..e3bcdce 100644
--- a/lua/telescope/builtin/internal.lua
+++ b/lua/telescope/builtin/internal.lua
@@ -178,9 +178,10 @@ internal.pickers = function(opts)
actions.select_default:replace(function(prompt_bufnr)
local current_picker = action_state.get_current_picker(prompt_bufnr)
local selection_index = current_picker:get_index(current_picker:get_selection_row())
- actions._close(prompt_bufnr, cached_pickers[selection_index].initial_mode == "insert")
+ actions.close(prompt_bufnr)
opts.cache_picker = opts._cache_picker
opts["cache_index"] = selection_index
+ opts["initial_mode"] = cached_pickers[selection_index].initial_mode
internal.resume(opts)
end)
map("i", "<C-x>", actions.remove_selected_picker)