aboutsummaryrefslogtreecommitdiff
path: root/helix-term
diff options
context:
space:
mode:
authorMike Trinkala2023-02-12 19:13:22 +0000
committerGitHub2023-02-12 19:13:22 +0000
commitef221abe83862cfdfcce358bbecc14080824abdb (patch)
treefff9d9dc08aa6308a6f8de5d9b2e957181ce6e3d /helix-term
parenta4751db8c7f308494e574429fc862a8deec96a7b (diff)
Prevent a panic when uncommenting a line with only a comment token (#5933)
Open a new document `test.rs` and type the following: `di//<esc><C-c>` The margin calculation pushes the range out of bounds for the comment marker when there are no characters (newline) after it. thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Char range out of bounds: char range 0..3, Rope/RopeSlice char length 2', ropey-1.6.0/src/rope.rs:546:37 The debug build catches the error in the transaction: thread 'main' panicked at 'attempt to subtract with overflow', helix-core/src/transaction.rs:503:26
Diffstat (limited to 'helix-term')
0 files changed, 0 insertions, 0 deletions