micro/internal/action
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
..
actions_other.go Change project layout and use go.mod 2019-12-25 17:05:10 -05:00
actions_posix.go Fix v2 import path for go mod 2020-05-04 10:16:15 -04:00
actions.go Rework FindMatchingBrace() interface and implementation (#3319) 2024-06-05 00:56:19 +02:00
bindings.go bindings: Small refactoring of TryBindKey() for better readability 2024-04-25 23:21:52 +02:00
bufpane.go Implemented SubWordRight, SubWordLeft, SelectSubWordRight, SelectSubWordLeft and DeleteSubWordRight, DeleteSubWordLeft 2024-05-20 23:23:33 +02:00
command.go Relocate buffer view when reloading file (#3250) 2024-04-21 22:49:01 +02:00
defaults_darwin.go Merge pull request #2606 from dmaluka/mouse-release-and-drag-events 2024-03-14 03:54:04 +01:00
defaults_other.go Merge pull request #2606 from dmaluka/mouse-release-and-drag-events 2024-03-14 03:54:04 +01:00
defaults.go Update keybinding docs 2020-09-06 17:38:23 -04:00
events.go Introduce mouse release and mouse drag events 2023-01-29 18:21:59 +01:00
globals.go Improve comments 2021-08-21 17:58:30 -04:00
infocomplete.go action: Fix the duplication of the unknown filetype (#3258) 2024-04-19 06:01:27 +02:00
infopane.go infopane: DoKeyEvent: it is buggy, let's add a TODO for now 2024-04-25 00:30:41 +02:00
keytree.go More style improvements 2021-08-21 18:04:08 -04:00
pane.go More style improvements 2021-08-21 18:04:08 -04:00
rawpane.go Update to tcell v2 2020-09-05 14:52:35 -04:00
tab.go action: tab: Stop resize in case of mouse release while not pressed 2024-04-27 21:38:02 +02:00
terminal_supported.go Check error in terminal emulator 2020-07-27 17:43:55 -04:00
terminal_unsupported.go Use actual lua functions for callbacks instead of strings 2020-02-08 15:49:41 -05:00
termpane.go action: Provide Name() to treat TermPane as Pane 2024-04-25 23:34:39 +02:00