Files
zed/crates/editor
Parker Loflin 65bbc884e9 editor: Search full lines in Vim visual line selections (#67394)
## 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>
2026-11-25 17:32:52 +00:00
..