matchit.zip icon indicating copy to clipboard operation
matchit.zip copied to clipboard

Avoid spurious entries in jump list

Open carlobaldassi opened this issue 9 years ago • 3 comments

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>.

carlobaldassi avatar May 21 '15 01:05 carlobaldassi

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.

benjifisher avatar Sep 07 '15 19:09 benjifisher

Update: I removed the keepjumps from the section which handles counts.

carlobaldassi avatar Feb 18 '16 21:02 carlobaldassi

@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.

tweekmonster avatar Jul 17 '16 19:07 tweekmonster