mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-13 05:43:52 -05:00
Try to avoid trailing newline blame issues
Resolves: https://github.com/tpope/vim-fugitive/issues/1892
This commit is contained in:
@@ -6771,9 +6771,13 @@ function! s:BlameSubcommand(line1, count, range, bang, mods, options) abort
|
||||
elseif empty(files) && len(matchstr(s:DirCommitFile(@%)[1], '^\x\x\+$'))
|
||||
let cmd += [matchstr(s:DirCommitFile(@%)[1], '^\x\x\+$')]
|
||||
elseif empty(files) && !s:HasOpt(flags, '--reverse')
|
||||
let cmd += ['--contents', tempname . '.in']
|
||||
silent execute 'noautocmd keepalt %write ' . s:fnameescape(tempname . '.in')
|
||||
let delete_in = 1
|
||||
if &modified
|
||||
let cmd += ['--contents', tempname . '.in']
|
||||
silent execute 'noautocmd keepalt %write ' . s:fnameescape(tempname . '.in')
|
||||
let delete_in = 1
|
||||
elseif &autoread
|
||||
exe 'checktime ' . bufnr('')
|
||||
endif
|
||||
else
|
||||
call fugitive#Autowrite()
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user