Provide failsafe for foldtext filename

Closes #216.
This commit is contained in:
Tim Pope
2012-10-21 23:21:12 -04:00
parent 09743e76a0
commit 9afeebf32e

View File

@@ -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