mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-09 20:13:46 -05:00
Show message like "Hunk 4 of 11" after hunk jumping
This commit is contained in:
@@ -61,6 +61,9 @@ function! gitgutter#hunk#next_hunk(count) abort
|
||||
let hunk_count += 1
|
||||
if hunk_count == a:count
|
||||
execute 'normal!' hunk[2] . 'Gzv'
|
||||
if g:gitgutter_show_msg_on_hunk_jumping
|
||||
redraw | echo printf('Hunk %d of %d', index(hunks, hunk) + 1, len(hunks))
|
||||
endif
|
||||
return
|
||||
endif
|
||||
endif
|
||||
@@ -86,6 +89,9 @@ function! gitgutter#hunk#prev_hunk(count) abort
|
||||
if hunk_count == a:count
|
||||
let target = hunk[2] == 0 ? 1 : hunk[2]
|
||||
execute 'normal!' target . 'Gzv'
|
||||
if g:gitgutter_show_msg_on_hunk_jumping
|
||||
redraw | echo printf('Hunk %d of %d', index(hunks, hunk) + 1, len(hunks))
|
||||
endif
|
||||
return
|
||||
endif
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user