mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
48e08a1561
## Summary - Replace the `panic!` in `map_owned_wrapped_line_to_range` with a recoverable flow that skips synthetic leading characters, logs a warning on mid-line mismatch, and returns the mapped prefix range instead of crashing - Fixes a crash when `textwrap` produces owned lines with synthetic indent prefixes (e.g. non-space indents via `initial_indent`/`subsequent_indent`) ## Test plan - [x] Added unit test for direct mismatch recovery (`map_owned_wrapped_line_to_range_recovers_on_non_prefix_mismatch`) - [x] Added end-to-end `wrap_ranges` test with non-space indents that forces owned wrapped lines and validates full source reconstruction - [x] Verify no regressions in existing `wrapping.rs` tests (`cargo test -p codex-tui`)
48e08a1561
ยท
2026-02-23 20:14:50 +00:00
History