diff --git a/plugin/fzf.vim b/plugin/fzf.vim index 203dda63..7bb7c5a7 100644 --- a/plugin/fzf.vim +++ b/plugin/fzf.vim @@ -1104,6 +1104,12 @@ function! s:execute_term(dict, command, temps) abort let fzf.temps.batchfile = s:fzf_tempname().'.bat' call s:writefile(s:wrap_cmds(a:command), fzf.temps.batchfile) let command = fzf.temps.batchfile + elseif has('nvim') && &title && a:command =~ '[[:cntrl:]]' + " Neovim puts the command in the buffer name, which can end up raw in + " the terminal title (#4941) + let fzf.temps.shellscript = s:fzf_tempname() + call s:writefile([a:command], fzf.temps.shellscript) + let command = 'sh '.fzf#shellescape(fzf.temps.shellscript) else let command = a:command endif