Skip to content

Commit 886dd7f

Browse files
committed
fix: prevent moving cursor inside a fold
See easymotion#484 for the background. Fix: easymotion#383, Fix: easymotion#452 Close: easymotion#484 Co-authored-by: @Nealium
1 parent b3cfab2 commit 886dd7f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

autoload/EasyMotion.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1303,7 +1303,7 @@ function! s:EasyMotion(regexp, direction, visualmode, is_inclusive, ...) " {{{
13031303
if search_direction ==# 'b'
13041304
" FIXME: Hmm... I should use filter()
13051305
" keepjumps call cursor(foldclosed(pos[0]), 0)
1306-
else
1306+
elseif foldclosedend(pos[0]+1) != -1
13071307
keepjumps call cursor(foldclosedend(pos[0]+1), 0)
13081308
endif
13091309
else

0 commit comments

Comments
 (0)