mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-08 11:33:47 -05:00
Fix current line assumption
This commit is contained in:
@@ -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.']'
|
||||
|
||||
Reference in New Issue
Block a user