diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2021-02-15 13:58:49 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2021-02-15 13:58:49 +0900 |
commit | 13f180a70c47318a77181219a9ee474e0c5bc663 (patch) | |
tree | a559069c98dd04eafe9d3796dbb428179f654407 /plugin | |
parent | 6654239c94667fefb38d76cfc47b6abf5ced8149 (diff) |
[vim] Stay in terminal mode if fzf#run is called from sink
Fix #2352
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/fzf.vim | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugin/fzf.vim b/plugin/fzf.vim index 763747c3..1069af87 100644 --- a/plugin/fzf.vim +++ b/plugin/fzf.vim @@ -764,6 +764,10 @@ function! s:split(dict) endtry endfunction +noremap <silent> <Plug>(fzf-normal) <Nop> +noremap! <silent> <Plug>(fzf-normal) <Nop> +tnoremap <silent> <expr> <Plug>(fzf-normal) &filetype == 'fzf' ? "\<C-L>" : "\<C-\>\<C-n>" + function! s:execute_term(dict, command, temps) abort let winrest = winrestcmd() let pbuf = bufnr('') @@ -793,7 +797,7 @@ function! s:execute_term(dict, command, temps) abort else if bufnr('') == self.buf " Exit terminal mode first (see neovim#13769) - call feedkeys("\<C-\>\<C-n>", 'n') + call feedkeys("\<Plug>(fzf-normal)") " We use close instead of bd! since Vim does not close the split when " there's no other listed buffer (nvim +'set nobuflisted') close |