Closed Aumnescio closed 1 year ago
got it, fixed.
This is really hard, since there are so many off-by-ones to consider for this plugins 🙈 Probably due to lua using one-based indexes and vimscript using zero-based indexes
Kind of hate to keep bothering you constantly, but I think the cursor still gets stuck if there are 3 or more punctuation characters. For 1 or 2 characters, it works.
Example cases: (Bar '|' is cursor location.)
=== Title |===
Next line
OmegaNested |)))))))
Next line
Love the plugin though! And yeah, I've been struggling with Lua indexing too...
god, this has so many edge cases. fixed that one too
yeah no worry, not your fault that the indexing is so off. I got at least a dozen - 1
or +1
to fix for all the off-by-ones that I have to consider 🙈
Bug Description
Operation:
<Cmd>lua require('spider').motion('w')<CR>
This motion operation gets stuck when the last "word" in a line of text consists of only punctuation.
Reproduction & Sample Text
Before:
After:
Expected:
Other example "Before" situations where the cursor gets stuck.
neovim version
Make sure you have done the following
cw
,de
, …), I read the notes on operator-pending mode in the README.virtualedit=all
orvirtualedit=onemore
.