commit 0727261b38c10666aafa95bda053b0a24fa577b0 (tree)
parent 489201879b91b00377792b1a1eedf0e7a9659ae9
Author: Tim Pope <code@tpope.net>
Date: Sun, 10 Feb 2019 11:39:28 -0500
Fix current line assumption
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git 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.']'