Skip to content

Commit

Permalink
fix: prevent moving cursor inside a fold
Browse files Browse the repository at this point in the history
See easymotion#484 for the background.

Fix: easymotion#383, Fix: easymotion#452
Co-authored-by: @Nealium
  • Loading branch information
timsu92 committed Aug 29, 2022
1 parent b3cfab2 commit 046ea2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autoload/EasyMotion.vim
Original file line number Diff line number Diff line change
Expand Up @@ -1303,7 +1303,7 @@ function! s:EasyMotion(regexp, direction, visualmode, is_inclusive, ...) " {{{
if search_direction ==# 'b'
" FIXME: Hmm... I should use filter()
" keepjumps call cursor(foldclosed(pos[0]), 0)
else
elseif foldclosedend(pos[0]+1) != -1
keepjumps call cursor(foldclosedend(pos[0]+1), 0)
endif
else
Expand Down

0 comments on commit 046ea2f

Please sign in to comment.