Improve JK motion regex pattern for multibyte
This commit is contained in:
parent
44499bae25
commit
91464bdce4
@ -199,8 +199,9 @@ function! EasyMotion#JK(visualmode, direction) " {{{
|
||||
if g:EasyMotion_startofline
|
||||
call s:EasyMotion('^\(\w\|\s*\zs\|$\)', a:direction, a:visualmode ? visualmode() : '', 0)
|
||||
else
|
||||
let prev_column = getpos('.')[2] - 1
|
||||
call s:EasyMotion('^.\{,' . prev_column . '}\zs\(.\|$\)', a:direction, a:visualmode ? visualmode() : '', 0)
|
||||
let c = col('.')
|
||||
let pattern = printf('^.\{-}\zs\(\%%<%dv.\%%>%dv\|$\)', c + 1, c)
|
||||
call s:EasyMotion(pattern, a:direction, a:visualmode ? visualmode() : '', 0)
|
||||
endif
|
||||
return s:EasyMotion_is_cancelled
|
||||
endfunction " }}}
|
||||
|
Loading…
Reference in New Issue
Block a user