mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-09 12:03:47 -05:00
Fix current line assumption
This commit is contained in:
@@ -2041,9 +2041,9 @@ endfunction
|
|||||||
|
|
||||||
function! s:StageInfo(...) abort
|
function! s:StageInfo(...) abort
|
||||||
let lnum = a:0 ? a:1 : line('.')
|
let lnum = a:0 ? a:1 : line('.')
|
||||||
let sigil = matchstr(getline('.'), '^[ @\+-]')
|
let sigil = matchstr(getline(lnum), '^[ @\+-]')
|
||||||
let offset = -1
|
let offset = -1
|
||||||
if getline(lnum) =~# '^[ @\+-]'
|
if len(sigil)
|
||||||
let type = sigil ==# '-' ? '-' : '+'
|
let type = sigil ==# '-' ? '-' : '+'
|
||||||
while lnum > 0 && getline(lnum) !~# '^@'
|
while lnum > 0 && getline(lnum) !~# '^@'
|
||||||
if getline(lnum) =~# '^[ '.type.']'
|
if getline(lnum) =~# '^[ '.type.']'
|
||||||
|
|||||||
Reference in New Issue
Block a user