mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-10 12:33:46 -05:00
Try to wipe out temp buffer from :read
Also try to preserve marks.
This commit is contained in:
@@ -1593,9 +1593,12 @@ function! s:ReplaceCmd(cmd) abort
|
|||||||
if exec_error
|
if exec_error
|
||||||
call s:throw((len(err) ? err : filereadable(temp) ? join(readfile(temp), ' ') : 'unknown error running ' . a:cmd))
|
call s:throw((len(err) ? err : filereadable(temp) ? join(readfile(temp), ' ') : 'unknown error running ' . a:cmd))
|
||||||
endif
|
endif
|
||||||
silent exe 'keepalt $read ++edit' s:fnameescape(temp)
|
silent exe 'lockmarks keepalt 0read ++edit' s:fnameescape(temp)
|
||||||
silent keepjumps 1delete _
|
silent keepjumps $delete _
|
||||||
call delete(temp)
|
call delete(temp)
|
||||||
|
if s:cpath(fnamemodify(bufname('$'), ':p'), temp)
|
||||||
|
silent! execute bufnr('$') . 'bwipeout'
|
||||||
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:QueryLog(refspec) abort
|
function! s:QueryLog(refspec) abort
|
||||||
|
|||||||
Reference in New Issue
Block a user