diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index dbd8dd8..b1edf8f 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -1164,12 +1164,13 @@ function! fugitive#BufReadStatus() abort setlocal bufhidden=delete endif call fugitive#MapJumps() + let nowait = v:version >= 704 ? '' : '' nunmap P nunmap ~ nnoremap :execute StageNext(v:count1) nnoremap :execute StagePrevious(v:count1) - nnoremap - :silent execute StageToggle(line('.'),line('.')+v:count1-1) - xnoremap - :silent execute StageToggle(line("'<"),line("'>")) + exe "nnoremap " nowait "- :silent execute StageToggle(line('.'),line('.')+v:count1-1)" + exe "xnoremap " nowait "- :silent execute StageToggle(line(\"'<\"),line(\"'>\"))" nnoremap a :let b:fugitive_display_format += 1exe fugitive#BufReadStatus() nnoremap i :let b:fugitive_display_format -= 1exe fugitive#BufReadStatus() nnoremap C :Gcommit:echohl WarningMsgecho ':Gstatus C is deprecated in favor of cc'echohl NONE @@ -3321,6 +3322,7 @@ function! fugitive#MapJumps(...) abort nnoremap :exe GF("edit") endif if !&modifiable + let nowait = v:version >= 704 ? '' : '' if get(b:, 'fugitive_type', '') ==# 'blob' nnoremap o :.,.+1Gblame nnoremap S :vertical .,.+1Gblame @@ -3332,7 +3334,7 @@ function! fugitive#MapJumps(...) abort nnoremap O :exe GF("tabedit") nnoremap p :exe GF("pedit") endif - nnoremap - :exe 'Gedit ' . fnameescape(NavigateUp(v:count1)) if getline(1) =~# '^tree \x\{40\}$' && empty(getline(2))call search('^'.escape(expand('#:t'),'.*[]~\').'/\=$','wc')endif + exe "nnoremap " nowait "- :exe 'Gedit ' . fnameescape(NavigateUp(v:count1)) if getline(1) =~# '^tree \x\{40\}$' && empty(getline(2))call search('^'.escape(expand('#:t'),'.*[]~\').'/\=$','wc')endif" nnoremap P :exe 'Gedit ' . fnameescape(ContainingCommit().'^'.v:count1.Relative(':')) nnoremap ~ :exe 'Gedit ' . fnameescape(ContainingCommit().'~'.v:count1.Relative(':')) nnoremap C :exe 'Gedit ' . fnameescape(ContainingCommit())