Handle mysterious tab at the end of a diff filename with spaces

Closes https://github.com/tpope/vim-fugitive/issues/1202
This commit is contained in:
Tim Pope
2019-02-12 10:39:24 -05:00
parent 5c5581386f
commit b3de2f2284

View File

@@ -2153,9 +2153,9 @@ function! s:StageInline(mode, ...) abort
endif
let start = index
let mode = 'head'
elseif mode ==# 'head' && line ==# '--- ' . info.filename
elseif mode ==# 'head' && substitute(line, "\t$", '', '') ==# '--- ' . info.filename
let mode = 'await'
elseif mode ==# 'head' && line ==# '+++ ' . info.filename
elseif mode ==# 'head' && substitute(line, "\t$", '', '') ==# '+++ ' . info.filename
let mode = 'await'
elseif mode ==# 'capture'
call add(diff, line)