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 3eb6f316c09553989e59bb3802da100a6fb7c091 (tree)
parent 776ce315c472cfcba470b70bc84a12c924c3881e
Author: Tim Pope <code@tpope.net>
Date:   Sat, 13 Mar 2021 19:56:18 -0500

Act globally when invoking inline diff maps on Head: line

Closes https://github.com/tpope/vim-fugitive/issues/1563

Diffstat:
Mautoload/fugitive.vim | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim @@ -3420,7 +3420,9 @@ function! s:StageInline(mode, ...) abort endif let lnum1 = a:0 ? a:1 : line('.') let lnum = lnum1 + 1 - if a:0 > 1 && a:2 == 0 + if a:0 > 1 && a:2 == 0 && lnum1 == 1 + let lnum = line('$') - 1 + elseif a:0 > 1 && a:2 == 0 let info = s:StageInfo(lnum - 1) if empty(info.paths) && len(info.section) while len(getline(lnum))