helix/helix-core/src
Mike Trinkala 9267343830
Fix panic when using surround_replace/delete (#9796)
1. Create a document containing `{A}`
1. C-w v # vsplit
1. gl    # goto_line_end
1. b     # move_prev_word_start
1. `     # switch_to_lowercase
1. mrm(  # surround replace
1. C-w v # vsplit

In the debug build surround_replace/delete will immedately assert with
`assertion failed: last <= from', transaction.rs:597:13`. The splits and
lowercase conversion are not needed to trigger the bug.

In the release build the surround becomes `)a(` and the last vsplit
causes the transaction to panic.
`internal error: entered unreachable code:
(Some(Retain(18446744073709551573)))', transaction.rs:185:46`

Since the selection direction is backwards get_surround_pos returns the
pairs reversed but the downstream code assumes they are in the forward
direction.
2024-03-03 18:55:09 +01:00
..
doc_formatter Feat: LSP Type Hints (#5934) 2023-03-11 11:32:14 +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 toggling of block comments (#4718) 2024-02-27 22:36:25 +09:00
config.rs Add glob file type support (#8006) 2024-02-11 18:24:20 +01:00
diagnostic.rs make diagnostics stick to word boundaries 2023-12-27 15:28:14 +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
fuzzy.rs Don't use word splitting during fuzzy matching (#8192) 2023-09-06 23:03:48 +09:00
graphemes.rs Prevent GraphemeStrs created from Strings from leaking (#7920) 2023-08-12 20:13:06 -05:00
history.rs Prefer RopeSlice to &Rope in helix_core::syntax 2023-07-27 11:50:19 +09:00
indent.rs toggling of block comments (#4718) 2024-02-27 22:36:25 +09:00
lib.rs toggling of block comments (#4718) 2024-02-27 22:36:25 +09:00
line_ending.rs Add config for default line ending (#5621) 2023-06-16 12:02:15 -05:00
macros.rs Split parts of helix-term into helix-view. 2020-09-21 18:24:16 +09:00
match_brackets.rs Use injection syntax trees for bracket matching 2024-01-28 18:13:33 +09:00
movement.rs Respect injections in movement::move_parent_node_end 2024-01-28 18:13:33 +09:00
object.rs Fix edge-case in tree-sitter expand_selection selection command (#2877) 2022-06-25 13:12:30 -05:00
position.rs Fix typos (#6643) 2023-04-07 23:10:38 +08:00
rope_reader.rs search buffer contents during global search (#5652) 2023-07-11 21:26:11 +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 fix split_on_newline (#9756) 2024-02-29 10:47:41 +09:00
shellwords.rs Fix typos (#6643) 2023-04-07 23:10:38 +08:00
surround.rs Fix panic when using surround_replace/delete (#9796) 2024-03-03 18:55:09 +01:00
syntax.rs toggling of block comments (#4718) 2024-02-27 22:36:25 +09:00
test.rs fix test::plain 2023-03-20 18:34:40 -05:00
text_annotations.rs Fix typos (#6643) 2023-04-07 23:10:38 +08:00
textobject.rs fix test::plain 2023-03-20 18:34:40 -05:00
transaction.rs make diagnostics stick to word boundaries 2023-12-27 15:28:14 +09:00
wrap.rs don't break on hyphen with :reflow (#8569) 2023-10-21 07:58:36 -05:00