mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-10 20:43:47 -05:00
Open folds on hunk jumping
This commit is contained in:
@@ -51,7 +51,7 @@ function! gitgutter#hunk#next_hunk(count) abort
|
|||||||
if hunk[2] > current_line
|
if hunk[2] > current_line
|
||||||
let hunk_count += 1
|
let hunk_count += 1
|
||||||
if hunk_count == a:count
|
if hunk_count == a:count
|
||||||
execute 'normal!' hunk[2] . 'G'
|
execute 'normal!' hunk[2] . 'Gzv'
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
@@ -69,7 +69,7 @@ function! gitgutter#hunk#prev_hunk(count) abort
|
|||||||
let hunk_count += 1
|
let hunk_count += 1
|
||||||
if hunk_count == a:count
|
if hunk_count == a:count
|
||||||
let target = hunk[2] == 0 ? 1 : hunk[2]
|
let target = hunk[2] == 0 ? 1 : hunk[2]
|
||||||
execute 'normal!' target . 'G'
|
execute 'normal!' target . 'Gzv'
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user