editor: keep wrapped search matches visible with context - #3013
Conversation
Code reviewNo blocking issues found. Checked for bugs, CLAUDE.md compliance, git history context, and comment consistency. The root cause fix looks right: Two optional, non-blocking notes:
gpui-kit/crates/base/src/input/base/element.rs Lines 463 to 468 in 9c3e6be gpui-kit/crates/base/src/input/base/state.rs Lines 2244 to 2249 in 9c3e6be
gpui-kit/crates/base/src/input/base/state.rs Lines 2238 to 2241 in 9c3e6be 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
Description
Keep search matches visible with surrounding context when long lines wrap. Resolve matches to their display rows, including offscreen matches, and calculate padding from viewport capacity instead of visible logical-line count.
Screenshot
How to Test
cargo test -p gpui-base --lib input:: --offline— 220 tests passed, including the wrapped-match regression test.cargo run -p example-editor --offline— built and launched on macOS."path": "relative_path:asdfasfafadsf[?(@['username'] == 237842985798579834534536363365")]"Checklist
cargo runfor story tests related to the changes.