motiejus/dotfiles

Unnamed repository; edit this file 'description' to name the repository.
git clone https://git.jakstys.lt/motiejus/dotfiles.git
Log | Tree | Refs | README | LICENSE

commit 0ab2d9709cf4b96f5338a38322211ff6162efd84 (tree)
parent 7df9f07e1fd53d560f2e352d5faa3eba92cd1582
Author: Tim Pope <code@tpope.net>
Date:   Thu,  1 Aug 2019 19:27:35 -0400

Preserve cursor position after staging last untracked file

Diffstat:
Mautoload/fugitive.vim | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim @@ -2244,7 +2244,7 @@ function! s:StageSeek(info, fallback) abort endif let line = search('^' . info.section, 'wn') if !line - for section in get({'Staged': ['Unstaged', 'Untracked'], 'Unstaged': ['Untracked', 'Staged']}, info.section, []) + for section in get({'Staged': ['Unstaged', 'Untracked'], 'Unstaged': ['Untracked', 'Staged'], 'Untracked': ['Unstaged', 'Stacked']}, info.section, []) let line = search('^' . section, 'wn') if line return line + (info.index > 0 ? 1 : 0)