matchit.zip
matchit.zip copied to clipboard
Avoid spurious entries in jump list
This commit adds a few keepjumps
annotations to some commands. This prevents polluting the jumplist with intermediate positions from the internal computations of the plugin, which in turn helps when navigating the buffer with <CTRL-O>
and <CTRL-I>
.
When handling a count, my intention is to behave the same as the default: see :help N%
. A little experimentation shows that this does change the jump list, so I do not want to add :keepjumps
there.
The other places where you add :keepjumps
seem like a good idea, but I think it would be even better to make the changes suggested in #3.
Update: I removed the keepjumps
from the section which handles counts.
@benjifisher Is there a chance of this getting merged? The jumps kind of put a bee in my bonnet. I can submit a PR that uses winrestview()
if you think that's preferred.