Fix wrong jump if no count is specified
If jump next hunk with no count, it move last hunk of below hunks. v:count step is 0, 2, 3, 4..., so if no count is specified, next hunk is -1(this is last hunk of below hunks). Because of above reason, I change to use v:count1 instead of v:count. v:count1 step is 1, 2, 3, 4... . Closes #40.
This commit is contained in:
parent
c2770af9f1
commit
f550254e33
@ -61,15 +61,15 @@ com! -nargs=0 -bar SyDebug call sy#debug#list_active_buffe
|
||||
|
||||
" Init: mappings {{{1
|
||||
if exists('g:signify_mapping_next_hunk')
|
||||
execute 'nnoremap <silent> '. g:signify_mapping_next_hunk .' :<c-u>execute v:count ."SignifyJumpToNextHunk"<cr>'
|
||||
execute 'nnoremap <silent> '. g:signify_mapping_next_hunk .' :<c-u>execute v:count1 ."SignifyJumpToNextHunk"<cr>'
|
||||
else
|
||||
nnoremap <silent> <leader>gj :<c-u>execute v:count .'SignifyJumpToNextHunk'<cr>
|
||||
nnoremap <silent> <leader>gj :<c-u>execute v:count1 .'SignifyJumpToNextHunk'<cr>
|
||||
endif
|
||||
|
||||
if exists('g:signify_mapping_prev_hunk')
|
||||
execute 'nnoremap <silent> '. g:signify_mapping_prev_hunk .' :<c-u>execute v:count ."SignifyJumpToPrevHunk"<cr>'
|
||||
execute 'nnoremap <silent> '. g:signify_mapping_prev_hunk .' :<c-u>execute v:count1 ."SignifyJumpToPrevHunk"<cr>'
|
||||
else
|
||||
nnoremap <silent> <leader>gk :<c-u>execute v:count .'SignifyJumpToPrevHunk'<cr>
|
||||
nnoremap <silent> <leader>gk :<c-u>execute v:count1 .'SignifyJumpToPrevHunk'<cr>
|
||||
endif
|
||||
|
||||
if exists('g:signify_mapping_toggle_highlight')
|
||||
|
Loading…
Reference in New Issue
Block a user