mirror of
https://github.com/zed-industries/zed.git
synced 2026-11-27 11:02:33 +01:00
65bbc884e9
## Summary `search::ToggleSelection` uses the raw selection. In Vim visual line mode, the search range then starts and ends at the cursor columns instead of covering the selected lines. Search now uses the full lines in line mode. Closes #42369 ## Testing - To reproduce, enter visual line mode from the middle of a line, select another line, run `vim::Search` and `search::ToggleSelection`, then search. - Tested on Linux. On `main`, matches outside the cursor columns are skipped. On this branch, they're found. - `test_find_matches_in_line_mode_selections` fails without this change. - `cargo test -p search -p editor -p vim --lib` and `./script/clippy -p editor -p search` pass. ### Showcase https://github.com/user-attachments/assets/3be687c0-99df-48de-8a57-f43ab924dbf6 ## Self-review - [x] I've reviewed my diff for quality, security, reliability, and performance. - [x] UI changes follow the [checklist](https://zed.dev/docs/development/ui-checklist). - [x] Tests cover the new or changed behavior. Release Notes: - Fixed `search: toggle selection` to select the whole buffer lines when used within Vim's visual line mode --------- Co-authored-by: dino <dinojoaocosta@gmail.com>