micro/internal/buffer
Dmytro Maluka fd3a00226c
Add matchbraceleft option (#3432)
Add `matchbraceleft` option to allow disabling the default behavior
matching not just the brace under cursor but also the brace to the left
of it (which is arguably convenient, but also ambiguous and
non-intuitive). With `matchbraceleft` disabled, micro will only match
the brace character that is precisely under the cursor, and also when
jumping to the matching brace, will always move cursor precisely to the
matching brace character, not to the character next to it.

Nota bene: historical journey:

- There was already a `matchbraceleft` option introduced in commit
  ea6a87d41a, when this feature (matching brace to the left) was
  introduced first time. That time it was matching _only_ the brace
  to the left, _instead_ of the brace under the cursor, and was
  disabled by default.

- Later this feature was removed during the big refactoring of micro.

- Then this feature was reintroduced again in commit d1e713ce08, in
  its present form (i.e. combined brace matching both under the cursor
  and to the left, simulating I-beam cursor behavior), and it was
  introduced unconditionally, without an option to disable it.

- Since then, multiple users complained about this feature and asked
  for an option to disable it, so now we are reintroducing it as an
  option again (this time enabled by default though).
2024-08-18 21:08:05 +02:00
..
autocomplete.go Replaced IsNonAlphaNumeric() with IsNonWordChar() 2024-05-20 23:23:33 +02:00
backup.go Allow aborting while opening a file with backup 2021-08-02 21:05:22 -04:00
buffer.go Add matchbraceleft option (#3432) 2024-08-18 21:08:05 +02:00
buffer_generated_test.go Merge branch 'buffer-benchmarks' of https://github.com/p-e-w/micro into p-e-w-buffer-benchmarks 2020-05-20 15:28:36 -04:00
buffer_test.go buffer: Uncomment InitRuntimeFiles(false) in the buffer_test.go 2024-04-05 14:24:59 +02:00
cursor.go Fixed trailing line spaces being ignored by word- or subword-jumps (#3321) 2024-06-04 21:10:09 +02:00
eventhandler.go undo/redo: Remove no longer needed teCursor temp var 2024-08-04 13:56:03 +02:00
line_array.go buffer: Rename LineBytes parameter to "lineN" to fit to the rest 2024-04-05 14:24:39 +02:00
line_array_test.go Improve unicode line array test 2020-05-20 19:53:54 -04:00
loc.go Use CharacterCount over RuneCount 2020-05-20 16:47:08 -04:00
message.go Warn for readonly instead of setting option 2021-05-19 14:58:00 -04:00
save.go autosave: don't save unmodified buffer (#3356) 2024-06-17 12:59:32 +02:00
search.go command: Fix replace to be able to insert '$' (#2954) 2024-03-17 21:37:16 +01:00
serialize.go Fix quality issues (#1856) 2020-09-16 00:08:01 -04:00
settings.go buffer/settings: Add comment why do we need to zero origHash 2024-08-18 15:51:47 +02:00
stack.go Change project layout and use go.mod 2019-12-25 17:05:10 -05:00
stack_test.go Change project layout and use go.mod 2019-12-25 17:05:10 -05:00