From 3725f364ccd25b85a91970720ba9bc2931861910 Mon Sep 17 00:00:00 2001 From: phanium <91544758+phanen@users.noreply.github.com> Date: Fri, 20 Jun 2025 16:04:48 +0800 Subject: [PATCH] Fix cmd hisotry correctly (#1594) --- autoload/fzf/vim.vim | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/autoload/fzf/vim.vim b/autoload/fzf/vim.vim index eb4c49f..7a1c4d7 100755 --- a/autoload/fzf/vim.vim +++ b/autoload/fzf/vim.vim @@ -669,9 +669,8 @@ function! s:history_sink(type, lines) let key = a:lines[0] let item = matchstr(a:lines[1], ' *[0-9]\+ *\zs.*') if key == 'ctrl-e' - call histadd(a:type, item) redraw - call feedkeys(a:type."\", 'n') + call feedkeys(a:type.item, 'nt') else if a:type == ':' call histadd(a:type, item) @@ -1236,9 +1235,9 @@ function! s:command_sink(lines) endif let cmd = matchstr(a:lines[1], s:tab.'\zs\S*\ze'.s:tab) if empty(a:lines[0]) - call feedkeys(':'.cmd.(a:lines[1][0] == '!' ? '' : ' '), 'n') + call feedkeys(':'.cmd.(a:lines[1][0] == '!' ? '' : ' '), 'nt') else - call feedkeys(':'.cmd."\", 'n') + call feedkeys(':'.cmd."\", 'nt') endif endfunction