mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-14 22:33:51 -05:00
Fix status reload after staging entire section
Resolves: https://github.com/tpope/vim-fugitive/issues/1912
This commit is contained in:
@@ -5139,11 +5139,14 @@ function! s:StagePatch(lnum1,lnum2) abort
|
|||||||
for lnum in range(a:lnum1,a:lnum2)
|
for lnum in range(a:lnum1,a:lnum2)
|
||||||
let info = s:StageInfo(lnum)
|
let info = s:StageInfo(lnum)
|
||||||
if empty(info.paths) && info.section ==# 'Staged'
|
if empty(info.paths) && info.section ==# 'Staged'
|
||||||
return 'tab Git reset --patch'
|
execute 'tab Git reset --patch'
|
||||||
|
break
|
||||||
elseif empty(info.paths) && info.section ==# 'Unstaged'
|
elseif empty(info.paths) && info.section ==# 'Unstaged'
|
||||||
return 'tab Git add --patch'
|
execute 'tab Git add --patch'
|
||||||
|
break
|
||||||
elseif empty(info.paths) && info.section ==# 'Untracked'
|
elseif empty(info.paths) && info.section ==# 'Untracked'
|
||||||
return 'tab Git add --interactive'
|
execute 'tab Git add --interactive'
|
||||||
|
break
|
||||||
elseif empty(info.paths)
|
elseif empty(info.paths)
|
||||||
continue
|
continue
|
||||||
endif
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user