Shougo / unite.vim

:dragon: Unite and create user interfaces
http://www.vim.org/scripts/script.php?script_id=3396
Other
2.85k stars 223 forks source link

Fix cursor up/down with count from prompt line #1209

Closed wilywampa closed 7 years ago

wilywampa commented 7 years ago

This fixes cursor motion when the cursor is on the prompt line and a count is given. To reproduce the problem:

  1. Make sure g:unite_enable_auto_select is enabled
  2. Open a Unite window and have the cursor on the prompt line
  3. Type "3j" is the prompt is at the top or "3k" if the prompt is below
  4. The cursor will move 31 lines down or up instead of 1 line because the cursor motion function returns "1j" resulting in "31j"

The fix is to add the count to the return value of the cursor motion function and cancel v:count using <Esc>.

Shougo commented 7 years ago

OK