Skip to content

[vimode] Fix motion to matching item off-by-one

Arusekk ­­ requested to merge (removed):vimode-matching into master

Consider the following quite common code pattern:

someFunc((void*)ptr, ...);
^ [cursor here]

Placing cursor on the beginning and pressing % went to:

someFunc((void*)ptr, ...);
               ^ [cursor here]

Now it should instead correctly go to:

someFunc((void*)ptr, ...);
                        ^ [cursor here]

This issue happened whenever there were two consecutive brackets of any type. A bonus regression test included.

Merge request reports