From 7bcbbb853d1e0d22babb056141e80768e9541946 Mon Sep 17 00:00:00 2001 From: Rishikesh Vaishnav Date: Sun, 14 May 2023 21:44:48 +0200 Subject: [PATCH] fix: replace default mapping rather than mapping CR directly for history and search pickers (#2506) (cherry picked from commit 40dc9523521c58afe313acaf13c89fc8cf867a3d) --- lua/telescope/builtin/__internal.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/telescope/builtin/__internal.lua b/lua/telescope/builtin/__internal.lua index 822534f..77165a4 100644 --- a/lua/telescope/builtin/__internal.lua +++ b/lua/telescope/builtin/__internal.lua @@ -556,7 +556,7 @@ internal.command_history = function(opts) sorter = conf.generic_sorter(opts), attach_mappings = function(_, map) - map({ "i", "n" }, "", actions.set_command_line) + actions.select_default:replace(actions.set_command_line) map({ "i", "n" }, "", actions.edit_command_line) -- TODO: Find a way to insert the text... it seems hard. @@ -586,7 +586,7 @@ internal.search_history = function(opts) sorter = conf.generic_sorter(opts), attach_mappings = function(_, map) - map({ "i", "n" }, "", actions.set_search_line) + actions.select_default:replace(actions.set_search_line) map({ "i", "n" }, "", actions.edit_search_line) -- TODO: Find a way to insert the text... it seems hard.