add proper jump handling
This commit is contained in:
parent
a7d9b85ae2
commit
2f615f3067
@ -6,6 +6,7 @@ let g:loaded_signify = 1
|
||||
" Default values {{{1
|
||||
let s:line_highlight_b = 0
|
||||
let s:colors_set_b = 0
|
||||
let s:last_jump_was_next = -1
|
||||
let s:active_buffers = {}
|
||||
|
||||
let s:id_start = 0x100
|
||||
@ -208,12 +209,20 @@ endfunction
|
||||
|
||||
" Functions -> s:jump_to_next_change() {{{2
|
||||
function! s:jump_to_next_change()
|
||||
if s:last_jump_was_next == 0
|
||||
let s:id_jump += 2
|
||||
endif
|
||||
exe 'sign jump '. s:id_jump .' file='. expand('%:p')
|
||||
let s:id_jump = ((s:id_jump + 1) == s:id_top) ? (s:id_start) : (s:id_jump + 1)
|
||||
let s:id_jump = (s:id_jump == (s:id_top - 1)) ? (s:id_start) : (s:id_jump + 1)
|
||||
let s:last_jump_was_next = 1
|
||||
endfunction
|
||||
|
||||
" Functions -> s:jump_to_prev_change() {{{2
|
||||
function! s:jump_to_prev_change()
|
||||
if s:last_jump_was_next == 1
|
||||
let s:id_jump -= 2
|
||||
endif
|
||||
exe 'sign jump '. s:id_jump .' file='. expand('%:p')
|
||||
let s:id_jump = (s:id_jump == s:id_start) ? (s:id_top - 1) : (s:id_jump - 1)
|
||||
let s:last_jump_was_next = 0
|
||||
endfunction
|
||||
|
Loading…
Reference in New Issue
Block a user