From 05b42dab55208eb75d25ed96ec425503dacceea6 Mon Sep 17 00:00:00 2001 From: NAKAI Tsuyoshi <82267684+uga-rosa@users.noreply.github.com> Date: Wed, 26 Apr 2023 13:22:53 +0900 Subject: [PATCH] fix(actions): support commands with special chars (#2224) (cherry picked from commit 713d26b98583b160b50fb827adb751f768238ed3) --- lua/telescope/actions/init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/telescope/actions/init.lua b/lua/telescope/actions/init.lua index 5750f79..6ab7992 100644 --- a/lua/telescope/actions/init.lua +++ b/lua/telescope/actions/init.lua @@ -362,13 +362,14 @@ end local set_edit_line = function(prompt_bufnr, fname, prefix, postfix) postfix = vim.F.if_nil(postfix, "") + postfix = a.nvim_replace_termcodes(postfix, true, false, true) local selection = action_state.get_selected_entry() if selection == nil then utils.__warn_no_selection(fname) return end actions.close(prompt_bufnr) - a.nvim_feedkeys(a.nvim_replace_termcodes(prefix .. selection.value .. postfix, true, false, true), "t", true) + a.nvim_feedkeys(prefix .. selection.value .. postfix, "n", true) end --- Set a value in the command line and don't run it, making it editable.