Open folds on hunk jumping

This commit is contained in:
Sudo Nice
2017-11-01 11:58:34 +00:00
committed by Andy Stewart
parent 579f0a5006
commit 1e60667322

View File

@@ -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