From: Stefan Huber Date: Sat, 13 Mar 2021 21:04:45 +0000 (+0100) Subject: Upgrade plug.vim X-Git-Url: https://git.sthu.org/?a=commitdiff_plain;h=1b46ae546caf268e6cec40ede48ea45817c44dfa;p=vimconf.git Upgrade plug.vim --- diff --git a/autoload/plug.vim b/autoload/plug.vim index 9c296ac..2b89b5a 100644 --- a/autoload/plug.vim +++ b/autoload/plug.vim @@ -935,7 +935,7 @@ function! s:prepare(...) call s:new_window() endif - nnoremap q :if b:plug_preview==1pcendifbd + nnoremap q :call close_pane() 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]'