Consider using search() in s:nextItem
LemonBoy opened this issue · comments
The help file eval.txt
mentions two flags that might be useful
'n' do Not move the cursor
'W' don't Wrap around the end of the file
Cool, I'll look into that this weekend. :)
Ah, I think I did this because you can't specify a start line for search() without moving the cursor. I think it will stay that way. I'll modify the comment, though.
I'll close this, but reopen if you think I'm wrong.
Using cursor
and setting the '
mark before changing the cursor should do the trick, by using search
with no s
flag you can just m'
when you're done and the code's IMO nicer.
It might look nicer or more concise, but I'd argue it's "nicer" to never
touch or depend on any global state.
On Sat, Mar 19, 2016 at 12:03:35PM -0700, TheLemonMan wrote:
Using
cursor
and setting the'
mark before changing the cursor should do the trick, by usingsearch
with nos
flag you can justm'
when you're done and the code's IMO nicer.
You are receiving this because you modified the open/close state.
Reply to this email directly or view it on GitHub:
#1 (comment)