[Commands] Fix hit-enter/more-prompt with terminal buffer fzf (#1363)

Since 85ae745910,
fzf opens in a terminal buffer (in my setup) and that breaks commands
that end up showing the hit-enter or more prompt, such as :scriptnames
or :ALEInfo. No idea why those commands break (I tried to diagnose this
but gave up unfortunately), but executing them using feedkeys fixes
this.
This commit is contained in:
Tomáš Janoušek
2022-01-30 04:28:24 +00:00
committed by GitHub
parent 91332acb1c
commit 70541d2ee0

View File

@@ -989,8 +989,7 @@ function! s:command_sink(lines)
if empty(a:lines[0]) if empty(a:lines[0])
call feedkeys(':'.cmd.(a:lines[1][0] == '!' ? '' : ' '), 'n') call feedkeys(':'.cmd.(a:lines[1][0] == '!' ? '' : ' '), 'n')
else else
call histadd(':', cmd) call feedkeys(':'.cmd."\<cr>", 'n')
execute cmd
endif endif
endfunction endfunction