Open Nealium opened 2 years ago
On the example I gave if I tab over line 23 once, the issue doesn't happen- I knew it was my tabs :(
after tinkering: slightly editing it to double check that it's skipping lines that are inside folds, seems to fix the issue.
autoload/EasyMotion.vim
around line ~1037
" Skip folded lines {{{
if EasyMotion#helper#is_folded(pos[0])
if search_direction ==# 'b'
" FIXME: Hmm... I should use filter()
" keepjumps call cursor(foldclosed(pos[0]), 0)
else
keepjumps call cursor(foldclosedend(pos[0]+1), 0)
endif
else
call add(targets, pos)
endif
"}}}
" Skip folded lines {{{
if EasyMotion#helper#is_folded(pos[0])
if search_direction ==# 'b'
" FIXME: Hmm... I should use filter()
" keepjumps call cursor(foldclosed(pos[0]), 0)
else
if foldclosedend(pos[0]+1) != -1
keepjumps call cursor(foldclosedend(pos[0]+1), 0)
endif
endif
else
call add(targets, pos)
endif
"}}}
I have recently started using EasyMotion, and I am experiencing the same issue, but with all commands. Whenever a fold exists in the forward search direction, EasyMotion fails with a message similar to that in the OP.
I am using freshly updated versions of vim (9.0.1302) and EasyMotion. Before I updated the errors occurred in both directions, but now it only happens with forward searches. Backward motions all seem to work fine.
The only changes I have made to the default configuration are setting use_upper and some color tweaks.
Using the
(leader)j
or(leader)k
sometimes breaks. More than likely it's due to me upgrading to Vim 9.0, my odd tabbing of JQuery objects and the folding I've provided a js file snippet at the bottom, from the last time I ran into the error, I just trimmed the fat a bit.Error Message
System
Min Vimrc
Recreating
:19
+za
):15
\j
)\k
works from this area, but sometimes it's flipped\k
is broken and\j
worksFolded = Broken
Unfolded = works
edit: fixed missing quote in code block