-
-
Notifications
You must be signed in to change notification settings - Fork 361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Line Motion Invalid argument -1 #484
Line Motion Invalid argument -1 #484
Comments
UpdateOn 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. Original
" 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
"}}} Edited " 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
"}}} |
See easymotion#484 for the background. Fix: easymotion#383, Fix: easymotion#452 Co-authored-by: @Nealium
See easymotion#484 for the background. Fix: easymotion#383, Fix: easymotion#452 Close: easymotion#484 Co-authored-by: @Nealium
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. |
a fix according to easymotion#484 (comment)
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 foldingI'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
The text was updated successfully, but these errors were encountered: