zed/crates/rope
Marco Mihai Condrache 1ca52793ff
rope: Fix an unintentional panic (#47019)
Avoids the panic in #46974

But should be solved by using `saturating_sub` on the `start_overshoot`
calculation, ref:
https://github.com/zed-industries/zed/pull/47046#issuecomment-3762855786


37715d5a50/crates/rope/src/chunk.rs (L403C5-L415C6)

This function gets called with PANIC = false from `slice`. But if the
offset is outside the text, `log_err_char_boundary` will still panic,
because the first `if` doesn’t bail out early.

Release Notes:

- N/A

Signed-off-by: Marco Mihai Condrache <52580954+marcocondrache@users.noreply.github.com>
2026-01-20 12:23:17 +00:00
..
benches sum_tree: Make SumTree::append run in logarithmic time (#43349) 2025-11-24 14:49:00 +01:00
src rope: Fix an unintentional panic (#47019) 2026-01-20 12:23:17 +00:00
Cargo.toml adds tracing for instrumenting non-async functions (#44147) 2025-12-05 17:23:06 +00:00
LICENSE-GPL