From a3ba0ca67f8d3991ff7d2678246acd0494a053d8 Mon Sep 17 00:00:00 2001 From: Maksim Odnoletkov Date: Sun, 6 Oct 2019 01:18:06 +0100 Subject: [PATCH] Fix status diffs broken by missing sub attribute Fixes https://github.com/tpope/vim-fugitive/issues/1367 --- autoload/fugitive.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 5513a7b..c645926 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -2531,6 +2531,7 @@ function! s:StageInfo(...) abort \ 'paths': map(reverse(split(text, ' -> ')), 's:Tree() . "/" . v:val'), \ '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]'), + \ 'sub': get(get(get(b:fugitive_files, section, {}), text, {}), 'sub', ''), \ 'index': index} endfunction