helix-mods/helix-term/tests/test
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
..
commands Add glob file type support (#8006) 2024-02-11 18:24:20 +01:00
languages Fix YAML auto indent 2023-08-11 06:22:22 +09:00
auto_indent.rs migrate test_with_config to use AppBuilder 2023-03-20 18:34:40 -05:00
auto_pairs.rs Add config for default line ending (#5621) 2023-06-16 12:02:15 -05:00
commands.rs Fix panic when using join_selections_space (#9783) 2024-03-02 15:05:58 +01:00
helpers.rs Add glob file type support (#8006) 2024-02-11 18:24:20 +01:00
movement.rs Fix panic when using surround_replace/delete (#9796) 2024-03-03 18:55:09 +01:00
prompt.rs flush writes on force quit (#4397) 2022-10-21 13:28:29 +09:00
splits.rs Create helix-stdx crate for stdlib extensions 2024-01-18 10:57:53 +09:00