Vim's redraw can change v:shell_error

If any other plugins besides `vim-fugitive` are present in user's
instance of Vim, they can call external programs to show some
properties. Redraw will force them to call this programs again and value
of last shell error can be changed.
This commit is contained in:
Andrey Starodubtsev
2019-09-27 14:39:06 +03:00
committed by Tim Pope
parent 6eb5d8e4b2
commit 9c91766118

View File

@@ -4782,9 +4782,10 @@ function! s:BlameSubcommand(line1, count, range, bang, mods, args) abort
else
silent! execute '%write !'.basecmd.' > '.temp.' 2> '.error
endif
let l:shell_error = v:shell_error
redraw
try
if v:shell_error
if l:shell_error
let lines = readfile(error)
if empty(lines)
let lines = readfile(temp)