]> git.sthu.org Git - vimconf.git/commitdiff
Upgrade plug.vim
authorStefan Huber <shuber@sthu.org>
Sat, 13 Mar 2021 21:04:45 +0000 (22:04 +0100)
committerStefan Huber <shuber@sthu.org>
Sat, 13 Mar 2021 21:04:45 +0000 (22:04 +0100)
autoload/plug.vim

index 9c296ace453d674c32c318db640ad3057dd92c14..2b89b5a642c5e68aacec2434a6b04a75091f0aca 100644 (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]'