Fix statusline indicator on older Vim

Vim was clearing the statusline due to an error, despite the fact the
exception was caught and ignored.
This commit is contained in:
Tim Pope
2022-05-27 22:54:56 -04:00
parent 41939b09cb
commit ad16275775

View File

@@ -327,6 +327,9 @@ function! FugitiveIsGitDir(...) abort
endfunction
function! s:ReadFile(path, line_count) abort
if v:version < 800 && !filereadable(a:path)
return []
endif
try
return readfile(a:path, 'b', a:line_count)
catch