Fix status diffs broken by missing sub attribute

Fixes https://github.com/tpope/vim-fugitive/issues/1367
This commit is contained in:
Maksim Odnoletkov
2019-10-06 01:18:06 +01:00
committed by Tim Pope
parent 973d814e26
commit a3ba0ca67f

View File

@@ -2531,6 +2531,7 @@ function! s:StageInfo(...) abort
\ 'paths': map(reverse(split(text, ' -> ')), 's:Tree() . "/" . v:val'), \ 'paths': map(reverse(split(text, ' -> ')), 's:Tree() . "/" . v:val'),
\ 'commit': matchstr(getline(lnum), '^\%(\%(\x\x\x\)\@!\l\+\s\+\)\=\zs[0-9a-f]\{4,\}\ze '), \ 'commit': matchstr(getline(lnum), '^\%(\%(\x\x\x\)\@!\l\+\s\+\)\=\zs[0-9a-f]\{4,\}\ze '),
\ 'status': matchstr(getline(lnum), '^[A-Z?]\ze \|^\%(\x\x\x\)\@!\l\+\ze [0-9a-f]'), \ 'status': matchstr(getline(lnum), '^[A-Z?]\ze \|^\%(\x\x\x\)\@!\l\+\ze [0-9a-f]'),
\ 'sub': get(get(get(b:fugitive_files, section, {}), text, {}), 'sub', ''),
\ 'index': index} \ 'index': index}
endfunction endfunction