From bec8e7b7c77ec09917a9dd5396775a06fdf11b34 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sat, 14 Aug 2021 10:11:02 -0400 Subject: [PATCH] Don't override user maps with removal notices Resolves: https://github.com/tpope/vim-fugitive/issues/1811 --- autoload/fugitive.vim | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index a33f3c7..8a2d9ad 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -2516,7 +2516,7 @@ function! fugitive#BufReadStatus() abort call s:MapMotion('gp', "exe StageJump(v:count, 'Unpushed')") call s:MapMotion('gP', "exe StageJump(v:count, 'Unpulled')") call s:MapMotion('gr', "exe StageJump(v:count, 'Rebasing')") - call s:Map('n', 'C', ":echoerr 'fugitive: C has been removed in favor of cc'", '') + call s:Map('n', 'C', ":echoerr 'fugitive: C has been removed in favor of cc'", '') call s:Map('n', 'a', ":execute Do('Toggle',0)", '') call s:Map('n', 'i', ":execute NextExpandedHunk(v:count1)", '') call s:Map('n', "=", ":execute StageInline('toggle',line('.'),v:count)", '') @@ -2525,7 +2525,7 @@ function! fugitive#BufReadStatus() abort call s:Map('x', "=", ":execute StageInline('toggle',line(\"'<\"),line(\"'>\")-line(\"'<\")+1)", '') call s:Map('x', "<", ":execute StageInline('hide', line(\"'<\"),line(\"'>\")-line(\"'<\")+1)", '') call s:Map('x', ">", ":execute StageInline('show', line(\"'<\"),line(\"'>\")-line(\"'<\")+1)", '') - call s:Map('n', 'D', ":echoerr 'fugitive: D has been removed in favor of dd'", '') + call s:Map('n', 'D', ":echoerr 'fugitive: D has been removed in favor of dd'", '') call s:Map('n', 'dd', ":execute StageDiff('Gdiffsplit')", '') call s:Map('n', 'dh', ":execute StageDiff('Ghdiffsplit')", '') call s:Map('n', 'ds', ":execute StageDiff('Ghdiffsplit')", '') @@ -2543,8 +2543,8 @@ function! fugitive#BufReadStatus() abort 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", '') - call s:Map('n', 'g', ":echoerr 'Changed to X'", '') - call s:Map('x', 'g', ":echoerr 'Changed to X'", '') + call s:Map('n', 'g', ":echoerr 'Changed to X'", '') + call s:Map('x', 'g', ":echoerr 'Changed to X'", '') call s:Map('n', 'X', ":execute StageDelete(line('.'), 0, v:count)", '') call s:Map('x', 'X', ":execute StageDelete(line(\"'<\"), line(\"'>\"), v:count)", '') call s:Map('n', 'gI', ":execute StageIgnore(line('.'), line('.'), v:count)", '') @@ -6870,7 +6870,7 @@ function! fugitive#MapJumps(...) abort call s:Map('n', 'gO', ':0,4' . blame_map, '') call s:Map('n', 'O', ':0,5' . blame_map, '') - call s:Map('n', 'D', ":echoerr 'fugitive: D has been removed in favor of dd'", '') + call s:Map('n', 'D', ":echoerr 'fugitive: D has been removed in favor of dd'", '') call s:Map('n', 'dd', ":call fugitive#DiffClose()Gdiffsplit!", '') call s:Map('n', 'dh', ":call fugitive#DiffClose()Ghdiffsplit!", '') call s:Map('n', 'ds', ":call fugitive#DiffClose()Ghdiffsplit!", '') @@ -6910,13 +6910,13 @@ function! fugitive#MapJumps(...) abort call s:Map('nxo', '*', 'PatchSearchExpr(0)', '') call s:Map('nxo', '#', 'PatchSearchExpr(1)', '') endif - call s:Map('n', 'S', ':echoerr "Use gO"', '') + call s:Map('n', 'S', ':echoerr "Use gO"', '') call s:Map('n', 'dq', ":call fugitive#DiffClose()", '') call s:Map('n', '-', ":exe 'Gedit ' . fnameescape(NavigateUp(v:count1)) if getline(1) =~# '^tree \x\{40,\}$' && empty(getline(2))call search('^'.escape(expand('#:t'),'.*[]~\').'/\=$','wc')endif", '') call s:Map('n', 'P', ":exe 'Gedit ' . fnameescape(ContainingCommit().'^'.v:count1.Relative(':'))", '') call s:Map('n', '~', ":exe 'Gedit ' . fnameescape(ContainingCommit().'~'.v:count1.Relative(':'))", '') call s:Map('n', 'C', ":exe 'Gedit ' . fnameescape(ContainingCommit())", '') - call s:Map('n', 'cp', ":echoerr 'Use gC'", '') + call s:Map('n', 'cp', ":echoerr 'Use gC'", '') call s:Map('n', 'gC', ":exe 'Gpedit ' . fnameescape(ContainingCommit())", '') call s:Map('n', 'gc', ":exe 'Gpedit ' . fnameescape(ContainingCommit())", '') call s:Map('n', 'gi', ":exe 'Gsplit' (v:count ? '.gitignore' : '.git/info/exclude')", '')