9eb8782ff2
Instead of passing a single brace pair to FindMatchingBrace(), make it traverse all brace pairs in buffer.BracePairs on its own. This has the following advantages: 1. Makes FindMatchingBrace() easier to use, in particular much easier to use from Lua. 2. Lets FindMatchingBrace() ensure that we use just one matching brace - the higher-priority one. This fixes the following issues: ([foo]bar) ^ when the cursor is on `[`: - Both `[]` and `()` pairs are highlighted, whereas the expected behavior is that only one pair is highlighted - the one that the JumpToMatchingBrace action would jump to. - JumpToMatchingBrace action incorrectly jumps to `)` instead of `]` (which should take higher priority in this case). In contrast, with `((foo)bar)` it works correctly. |
||
---|---|---|
.. | ||
actions.go | ||
actions_other.go | ||
actions_posix.go | ||
bindings.go | ||
bufpane.go | ||
command.go | ||
defaults.go | ||
defaults_darwin.go | ||
defaults_other.go | ||
events.go | ||
globals.go | ||
infocomplete.go | ||
infopane.go | ||
keytree.go | ||
pane.go | ||
rawpane.go | ||
tab.go | ||
terminal_supported.go | ||
terminal_unsupported.go | ||
termpane.go |