From 9c91766118812acf5f3e226bdfdedba612d93977 Mon Sep 17 00:00:00 2001 From: Andrey Starodubtsev Date: Fri, 27 Sep 2019 14:39:06 +0300 Subject: [PATCH] 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. --- autoload/fugitive.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index b954dc8..5af07c0 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -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)