Skip to content

Commit

Permalink
Fix cursor up/down with count from prompt line
Browse files Browse the repository at this point in the history
  • Loading branch information
wilywampa committed Dec 3, 2016
1 parent 3469ced commit ca618c4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions autoload/unite/mappings.vim
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,8 @@ function! unite#mappings#cursor_up(is_skip_not_matched) abort "{{{
return repeat("\<Up>", cnt) .
\ (unite#helper#is_prompt(line('.') - cnt) ? "\<End>" : "\<Home>")
else
return cnt == 1 ? 'k' : cnt.'k'
let cnt += v:count == 0 ? 0 : (v:count - 1)
return "\<Esc>" . (cnt == 1 ? 'k' : cnt.'k')
endif
endfunction"}}}
function! unite#mappings#cursor_down(is_skip_not_matched) abort "{{{
Expand Down Expand Up @@ -767,7 +768,8 @@ function! unite#mappings#cursor_down(is_skip_not_matched) abort "{{{
return repeat("\<Down>", cnt) .
\ (unite#helper#is_prompt(line('.') + cnt) ? "\<End>" : "\<Home>")
else
return cnt == 1 ? 'j' : cnt.'j'
let cnt += v:count == 0 ? 0 : (v:count - 1)
return "\<Esc>" . (cnt == 1 ? 'j' : cnt.'j')
endif
endfunction"}}}
function! s:smart_preview() abort "{{{
Expand Down

0 comments on commit ca618c4

Please sign in to comment.