easymotion / vim-easymotion

Vim motions on speed!
http://www.vim.org/scripts/script.php?script_id=3526
7.5k stars 362 forks source link

fix virtual col for multibyte JK motion when g:EasyMotion_startofline=0 #355

Open SolaWing opened 6 years ago

SolaWing commented 6 years ago

Currently, when do jk motion at multibyte line, the col is incorrect. like following img

2017-11-19 11 01 18

the virtcol('.') is also slightly incorrect for returning the last column when char occupying multi column.

after searching in vim's function, I found getcurpos returns curswant, which is the perfect choice .

The "curswant" number is the preferred column when moving the cursor vertically.

2017-11-19 11 00 28