From ad16275775ae9e11b8d5491a4cd893a12f32f241 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Fri, 27 May 2022 22:54:56 -0400 Subject: [PATCH] Fix statusline indicator on older Vim Vim was clearing the statusline due to an error, despite the fact the exception was caught and ignored. --- plugin/fugitive.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 2d1e134..513f0fd 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -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