mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-11 12:53:52 -05:00
Jump to correct Unpushed/Unpulled section on reload
This commit is contained in:
@@ -3125,10 +3125,10 @@ endfunction
|
||||
|
||||
function! s:StageSeek(info, fallback) abort
|
||||
let info = a:info
|
||||
if empty(info.section)
|
||||
if empty(info.heading)
|
||||
return a:fallback
|
||||
endif
|
||||
let line = search('^' . info.section, 'wn')
|
||||
let line = search('^' . escape(substitute(info.heading, '(\d\+)$', '', ''), '^$.*[]~\'), 'wn')
|
||||
if !line
|
||||
for section in get({'Staged': ['Unstaged', 'Untracked'], 'Unstaged': ['Untracked', 'Staged'], 'Untracked': ['Unstaged', 'Staged']}, info.section, [])
|
||||
let line = search('^' . section, 'wn')
|
||||
|
||||
Reference in New Issue
Block a user