micro/internal/display
Dmytro Maluka 9eb8782ff2
Rework FindMatchingBrace() interface and implementation (#3319)
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.
2024-06-05 00:56:19 +02:00
..
bufwindow.go Rework FindMatchingBrace() interface and implementation (#3319) 2024-06-05 00:56:19 +02:00
infowindow.go Add statusline.inactive and statusline.suggestions color groups (#1832) 2023-03-13 16:18:44 -07:00
softwrap.go Fix relocate at the end of buffer when scrollmargin is 0 (#2578) 2022-10-01 13:03:40 -07:00
statusline.go plugins: Add capability to dis-/enable them per buffer (#2836) 2023-06-05 17:38:33 -07:00
tabwindow.go Adds options for tab bar and tab color reversing (#2480) 2022-07-17 12:18:11 -07:00
termwindow.go termwindow: Show cursor only when his X and Y axis is smaller than the window (#3036) 2024-03-13 20:58:44 +01:00
uiwindow.go Fix non-working split resize with mouse drag (#1811) 2020-08-04 18:37:19 -04:00
window.go Replace BufWidth & BufHeight with BufView 2021-04-08 23:54:18 +02:00