Add GV.vim-style q mapping (#827)

* Add GV.vim-style q mapping

* Fix test cases

Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
This commit is contained in:
Rosen StoyanovandJunegunn Choi authored and GitHub committed 2021-02-08 16:23:21 +09:00
1 parent 8b45742540
commit cffcfe150b
2 files changed
+20 -2

No files matched your search

+10 -1
View File
@@ -935,7 +935,7 @@ function! s:prepare(...)
call s:new_window()
endif
nnoremap <silent> <buffer> q :if b:plug_preview==1<bar>pc<bar>endif<bar>bd<cr>
nnoremap <silent> <buffer> q :call <SID>close_pane()<cr>
if a:0 == 0
call s:finish_bindings()
endif
@@ -957,6 +957,15 @@ function! s:prepare(...)
endif
endfunction
function! s:close_pane()
if b:plug_preview == 1
pc
let b:plug_preview = -1
else
bd
endif
endfunction
function! s:assign_name()
" Assign buffer name
let prefix = '[Plugins]'