From 3eb6f316c09553989e59bb3802da100a6fb7c091 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sat, 13 Mar 2021 19:56:18 -0500 Subject: [PATCH] Act globally when invoking inline diff maps on Head: line Closes https://github.com/tpope/vim-fugitive/issues/1563 --- autoload/fugitive.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index dcba57a..c792a61 100644 --- 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))