From 328501d4f05c3a7849cdf3d350a972972761e55a Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Tue, 31 Aug 2021 09:21:00 -0400 Subject: [PATCH] Make "q" error maps consistent --- autoload/fugitive.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index a496547..861fa51 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -2729,7 +2729,7 @@ function! fugitive#BufReadStatus() abort call s:Map('n', 'I', ":execute StagePatch(line('.'),line('.'))", '') call s:Map('x', 'I', ":execute StagePatch(line(\"'<\"),line(\"'>\"))", '') if empty(mapcheck('q', 'n')) - nnoremap q :echoerr "fugitive: q removed in favor of gq (or :q)" + nnoremap q :echoerr "fugitive: q is removed in favor of gq (or :q)" endif call s:Map('n', 'gq', ":if bufnr('$') == 1quitelsebdeleteendif", '') call s:Map('n', 'R', ":echohl WarningMsgecho 'Reloading is automatic. Use :e to force'echohl NONE", '') @@ -6901,8 +6901,8 @@ function! fugitive#BlameFileType() abort endif call s:Map('n', '', ':help :Git_blame', '') call s:Map('n', 'g?', ':help :Git_blame', '') - if mapcheck('q', 'n') =~# '^$\|bdelete' - call s:Map('n', 'q', ':echoerr "fugitive: q removed in favor of gq (or :q)"', '') + if empty(mapcheck('q', 'n')) + nnoremap q :echoerr "fugitive: q removed in favor of gq (or :q)" endif call s:Map('n', 'gq', ':exe BlameQuit()', '') call s:Map('n', '<2-LeftMouse>', ':exe BlameCommit("exe BlameLeave()edit")', '')