diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 7734d43..b7b249a 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -2041,9 +2041,9 @@ endfunction function! s:StageInfo(...) abort let lnum = a:0 ? a:1 : line('.') - let sigil = matchstr(getline('.'), '^[ @\+-]') + let sigil = matchstr(getline(lnum), '^[ @\+-]') let offset = -1 - if getline(lnum) =~# '^[ @\+-]' + if len(sigil) let type = sigil ==# '-' ? '-' : '+' while lnum > 0 && getline(lnum) !~# '^@' if getline(lnum) =~# '^[ '.type.']'