diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 71cc696..115d6cd 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -1813,7 +1813,7 @@ function! fugitive#BufReadStatus() abort nnoremap dv :execute StageDiff('Gvdiffsplit') nnoremap P :execute StagePatch(line('.'),line('.')+v:count1-1) xnoremap P :execute StagePatch(line("'<"),line("'>")) - if empty(mapcheck('q')) + if empty(mapcheck('q', 'n')) nnoremap q :if bufnr('$') == 1quitelsebdeleteendif endif exe 'nnoremap ' s:nowait "gq :if bufnr('$') == 1quitelsebdeleteendif" @@ -2041,7 +2041,7 @@ function! s:SetupTemp(file) abort setlocal foldmarker=<<<<<<<,>>>>>>> setlocal bufhidden=delete nobuflisted setlocal buftype=nowrite - if empty(mapcheck('q')) + if empty(mapcheck('q', 'n')) nnoremap q :bdelete endif exe 'nnoremap ' s:nowait "gq :bdelete" @@ -4378,7 +4378,7 @@ function! s:BlameCommand(line1, line2, range, count, bang, mods, reg, arg, args) let nowait = v:version >= 704 ? '' : '' nnoremap :help fugitive-:Gblame nnoremap g? :help fugitive-:Gblame - if empty(mapcheck('q')) + if empty(mapcheck('q', 'n')) nnoremap q :exe substitute(bufwinnr(b:fugitive_blamed_bufnr).' wincmd w'.bufnr('').'bdelete','^-1','','') endif exe 'nnoremap ' s:nowait "gq :exe substitute(bufwinnr(b:fugitive_blamed_bufnr).' wincmd w'.bufnr('').'bdeleteif expand(''%:p'') =~# ''^fugitive:[\\/][\\/]''Geditendif','^-1','','')"