mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-12-07 12:44:33 +08: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
|
function! s:PreviousHunk(count) abort
|
||||||
for i in range(a:count)
|
for i in range(a:count)
|
||||||
if &filetype ==# 'fugitive'
|
if &filetype ==# 'fugitive'
|
||||||
|
if getline('.') =~# '^@' && getline(line('.') - 1) =~# s:file_pattern
|
||||||
|
-
|
||||||
|
endif
|
||||||
let lnum = search(s:file_pattern . '\|^@','Wbn')
|
let lnum = search(s:file_pattern . '\|^@','Wbn')
|
||||||
call s:StageInline('show', lnum)
|
call s:StageInline('show', lnum)
|
||||||
call search('^? .\|^@','Wb')
|
call search('^? .\|^@','Wb')
|
||||||
|
|||||||
Reference in New Issue
Block a user