From 291df64115c21acf81139d1c2d5293fcfc9f7ea7 Mon Sep 17 00:00:00 2001 From: David Chang Date: Wed, 10 Jul 2024 19:42:03 +0800 Subject: [PATCH] ver Jul10th a fix according to https://github.com/easymotion/vim-easymotion/issues/484#issuecomment-1200663901 --- autoload/EasyMotion.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/autoload/EasyMotion.vim b/autoload/EasyMotion.vim index 2a472237..c9173a4e 100644 --- a/autoload/EasyMotion.vim +++ b/autoload/EasyMotion.vim @@ -1304,7 +1304,9 @@ function! s:EasyMotion(regexp, direction, visualmode, is_inclusive, ...) " {{{ " FIXME: Hmm... I should use filter() " keepjumps call cursor(foldclosed(pos[0]), 0) else - keepjumps call cursor(foldclosedend(pos[0]+1), 0) + if foldclosedend(pos[0]+1) != -1 + keepjumps call cursor(foldclosedend(pos[0]+1), 0) + endif endif else call add(targets, pos)