commit 9afeebf32e9bfd2a3ffc8f3e50e68651f88afaa8 (tree)
parent 09743e76a08249203c5afbf262dae32413d9b431
Author: Tim Pope <code@tpope.net>
Date: Sun, 21 Oct 2012 23:21:12 -0400
Provide failsafe for foldtext filename
Closes #216.
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim
@@ -2500,6 +2500,9 @@ function! fugitive#foldtext() abort
if filename ==# ''
let filename = matchstr(getline(v:foldstart), '^diff .\{-\} a/\zs.*\ze b/')
endif
+ if filename ==# ''
+ let filename = getline(v:foldstart)[5:-1]
+ endif
if exists('binary')
return 'Binary: '.filename
else