diff options
Diffstat (limited to '.config/nvim/autoload/plug.vim')
-rw-r--r-- | .config/nvim/autoload/plug.vim | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/.config/nvim/autoload/plug.vim b/.config/nvim/autoload/plug.vim index c1657f2..2b89b5a 100644 --- a/.config/nvim/autoload/plug.vim +++ b/.config/nvim/autoload/plug.vim @@ -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]' @@ -1532,7 +1541,7 @@ while 1 " Without TCO, Vim stack is bound to explode let [error, _] = s:git_validate(spec, 0) if empty(error) if pull - let cmd = ['git', 'fetch'] + let cmd = s:git_version_requirement(2) ? ['git', '-c', 'credential.helper=', 'fetch'] : ['git', 'fetch'] if has_tag && !empty(globpath(spec.dir, '.git/shallow')) call extend(cmd, ['--depth', '99999999']) endif |