mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-12 13:23:52 -05:00
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.
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user