helix/helix-core/src
Daniel S Poulin 6929a12f29
Make m textobject look for pairs enclosing selections (#3344)
* Make `m` textobject look for pairs enclosing selections

Right now, this textobject only looks for pairs that surround the
cursor. This ensures that the pair found encloses each selection, which
is likely to be intuitively what is expected of this textobject.

* Simplification of match code

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

* Adjust logic for ensuring surround range encloses selection

Prior, it was missing the case where the start of the selection came
before the opening brace. We also had an off-by-one error where if the
end of the selection was on the closing brace it would not work.

* Refactor to search for the open pair specifically to avoid edge cases

* Adjust wording of autoinfo to reflect new functionality

* Implement tests for surround functionality in new integration style

* Fix handling of skip values

* Fix out of bounds error

* Add `ma` version of tests

* Fix formatting of tests

* Reduce indentation levels for readability, and update comments

* Preserve each selection's direction with enclosing pair surround

* Add test case for multiple cursors resulting in overlap

* Mark known failures as TODO

* Make tests multi-threaded or they fail

* Cargo fmt

* Fix typos in integration test comments

---------

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2023-02-10 13:52:57 -06:00
..
doc_formatter rework positioning/rendering and enable softwrap/virtual text (#5420) 2023-02-01 02:03:19 +09:00
increment Fix new clippy lints (#5892) 2023-02-09 16:27:08 -06:00
auto_pairs.rs Fix erroneous indent between closers of auto-pairs (#5330) 2022-12-29 09:23:40 -06:00
chars.rs Temporarily turn on unicode-lines 2022-03-17 10:53:50 +09:00
comment.rs Fix new clippy lints (#5892) 2023-02-09 16:27:08 -06:00
config.rs Add support for local language configuration (#1249) 2022-04-18 12:10:51 +09:00
diagnostic.rs feat(lsp): add support for lsp Diagnostic{}.data (#4935) 2022-12-02 10:18:45 +09:00
diff.rs delete outdated reference to cessen/ropey#25 (#4928) 2022-11-28 19:07:47 -06:00
doc_formatter.rs rework positioning/rendering and enable softwrap/virtual text (#5420) 2023-02-01 02:03:19 +09:00
graphemes.rs rework positioning/rendering and enable softwrap/virtual text (#5420) 2023-02-01 02:03:19 +09:00
history.rs Fix transaction composition order in History::changes_since (#4981) 2022-12-03 12:09:08 +09:00
indent.rs Fix new clippy lints (#5892) 2023-02-09 16:27:08 -06:00
lib.rs rework positioning/rendering and enable softwrap/virtual text (#5420) 2023-02-01 02:03:19 +09:00
line_ending.rs properly handle LSP position encoding (#5711) 2023-02-09 16:19:29 +09:00
macros.rs Split parts of helix-term into helix-view. 2020-09-21 18:24:16 +09:00
match_brackets.rs Fix match brackets comment (#1346) 2021-12-24 07:27:31 +05:30
movement.rs Short-circuit the word and treesitter object movement commands (#5851) 2023-02-07 17:05:27 -06:00
object.rs Fix edge-case in tree-sitter expand_selection selection command (#2877) 2022-06-25 13:12:30 -05:00
path.rs Add workspace and document diagnostics picker (#2013) 2022-06-30 18:16:18 +09:00
position.rs rework positioning/rendering and enable softwrap/virtual text (#5420) 2023-02-01 02:03:19 +09:00
register.rs Refactor blackhole register (#4504) 2022-11-15 23:14:18 +09:00
search.rs Jump to the next number on the line before incrementing (#1778) 2022-04-01 22:14:37 +09:00
selection.rs rework positioning/rendering and enable softwrap/virtual text (#5420) 2023-02-01 02:03:19 +09:00
shellwords.rs Fix utf8 length handling for shellwords (#5738) 2023-02-01 16:07:42 -06:00
surround.rs Make m textobject look for pairs enclosing selections (#3344) 2023-02-10 13:52:57 -06:00
syntax.rs Fix new clippy lints (#5892) 2023-02-09 16:27:08 -06:00
test.rs Run clippy on workspace in CI (#4614) 2022-11-07 13:39:18 +09:00
text_annotations.rs rework positioning/rendering and enable softwrap/virtual text (#5420) 2023-02-01 02:03:19 +09:00
textobject.rs Make m textobject look for pairs enclosing selections (#3344) 2023-02-10 13:52:57 -06:00
transaction.rs properly handle LSP position encoding (#5711) 2023-02-09 16:19:29 +09:00
wrap.rs add reflow command (#2128) 2022-05-02 23:24:22 +09:00