mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-15 06:43:51 -05:00
Don't clobber alt buffer with :Gread
Why does :read do this???
This commit is contained in:
@@ -4662,7 +4662,7 @@ function! s:ReadPrepare(line1, count, range, mods) abort
|
|||||||
else
|
else
|
||||||
let pre = ''
|
let pre = ''
|
||||||
endif
|
endif
|
||||||
return [pre . mods . after . 'read', delete . 'diffupdate' . (a:count < 0 ? '|' . line('.') : '')]
|
return [pre . 'keepalt ' . mods . after . 'read', delete . 'diffupdate' . (a:count < 0 ? '|' . line('.') : '')]
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:ReadExec(line1, count, range, mods, env, args, options) abort
|
function! s:ReadExec(line1, count, range, mods, env, args, options) abort
|
||||||
@@ -4685,7 +4685,7 @@ function! fugitive#ReadCommand(line1, count, range, bang, mods, arg, args) abort
|
|||||||
return 'echoerr ' . string(v:exception)
|
return 'echoerr ' . string(v:exception)
|
||||||
endtry
|
endtry
|
||||||
if file =~# '^fugitive:' && a:count is# 0
|
if file =~# '^fugitive:' && a:count is# 0
|
||||||
return 'exe ' .string(s:Mods(a:mods) . fugitive#FileReadCmd(file, 0, pre)) . '|diffupdate'
|
return 'exe ' .string('keepalt ' . s:Mods(a:mods) . fugitive#FileReadCmd(file, 0, pre)) . '|diffupdate'
|
||||||
endif
|
endif
|
||||||
return read . ' ' . pre . ' ' . s:fnameescape(file) . '|' . post
|
return read . ' ' . pre . ' ' . s:fnameescape(file) . '|' . post
|
||||||
endfunction
|
endfunction
|
||||||
|
|||||||
Reference in New Issue
Block a user