diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 6d2ce7051b..17fd04d38f 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -4986,19 +4986,19 @@ function! s:StageDiff(diff) abort return 'Git --paginate diff --no-ext-diff' elseif len(info.paths) > 1 execute 'Gedit' . prefix s:fnameescape(':0:' . info.paths[0]) - return a:diff . '! @:'.s:fnameescape(info.paths[1]) + return 'keepalt ' . a:diff . '! @:'.s:fnameescape(info.paths[1]) elseif info.section ==# 'Staged' && info.sigil ==# '-' execute 'Gedit' prefix s:fnameescape(':0:'.info.paths[0]) - return a:diff . '! :0:%' + return 'keepalt ' . a:diff . '! :0:%' elseif info.section ==# 'Staged' execute 'Gedit' prefix s:fnameescape(':0:'.info.paths[0]) - return a:diff . '! @:%' + return 'keepalt ' . a:diff . '! @:%' elseif info.sigil ==# '-' execute 'Gedit' prefix s:fnameescape(':0:'.info.paths[0]) - return a:diff . '! :(top)%' + return 'keepalt ' . a:diff . '! :(top)%' else execute 'Gedit' prefix s:fnameescape(':(top)'.info.paths[0]) - return a:diff . '!' + return 'keepalt ' . a:diff . '!' endif endfunction @@ -7995,10 +7995,10 @@ function! fugitive#MapJumps(...) abort endif 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!", '') - call s:Map('n', 'dv', ":call fugitive#DiffClose()Gvdiffsplit!", '') + call s:Map('n', 'dd', ":call fugitive#DiffClose()keepalt Gdiffsplit!", '') + call s:Map('n', 'dh', ":call fugitive#DiffClose()keepalt Ghdiffsplit!", '') + call s:Map('n', 'ds', ":call fugitive#DiffClose()keepalt Ghdiffsplit!", '') + call s:Map('n', 'dv', ":call fugitive#DiffClose()keepalt Gvdiffsplit!", '') call s:Map('n', 'd?', ":help fugitive_d", '') else