helix-mods/helix-term
Mike Trinkala 5bd007266a
Fix panic when using join_selections_space (#9783)
Joining lines with Alt-J does not properly select the inserted spaces
when the selection contains blank lines. In the worst case it panics
with an out of bounds index.

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value:
Char index out of bounds: char index 11, Rope/RopeSlice char length 10'

Steps to reproduce:
* Create a new document
    ```
    a

    b

    c

    d

    e
    ```
* % (Select all)
* Alt-J (join and select the spaces)
2024-03-02 15:05:58 +01:00
..
src Fix panic when using join_selections_space (#9783) 2024-03-02 15:05:58 +01:00
tests Fix panic when using join_selections_space (#9783) 2024-03-02 15:05:58 +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