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 4e11f9dabfa5441798b5d6af1c2d22087db13e9d (tree)
parent d84582d5f767c11b7fb5ac2f5dca91d48f5556a9
Author: yut23 <yut23@gvljohnsons.com>
Date:   Wed, 20 Jul 2022 22:37:21 -0400

Fix `[c` from the first hunk of a file

This makes the rest of the function operate on the previous file rather
than the file of the hunk under the cursor.

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

diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim @@ -4611,6 +4611,9 @@ endfunction function! s:PreviousHunk(count) abort for i in range(a:count) if &filetype ==# 'fugitive' + if getline('.') =~# '^@' && getline(line('.') - 1) =~# s:file_pattern + - + endif let lnum = search(s:file_pattern . '\|^@','Wbn') call s:StageInline('show', lnum) call search('^? .\|^@','Wb')