helix/helix-term
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
..
src Fix panic when using join_selections_space (#9783) 2024-03-02 15:05:58 +01:00
tests Fix panic when using surround_replace/delete (#9796) 2024-03-03 18:55:09 +01:00
.gitignore Initial import. 2020-05-20 18:14:51 +09:00
build.rs Add icon to Windows executable (#9104) 2024-01-28 18:31:10 +09:00
Cargo.toml build(deps): bump tempfile from 3.10.0 to 3.10.1 (#9733) 2024-02-27 01:25:17 +01:00