Commit Graph
6 Commits
Author SHA1 Message Date
dualfroz 5f70e7afe2 vim: Close popovers and expanded hunks on escape in Helix normal mode
In Helix normal mode escape runs `vim::SwitchToHelixNormalMode`, which
only switches the mode, so the diagnostic shown by `] d`, a hunk expanded
with `g o`, a hover popover and the like stayed open. Vim mode closes them
because escape there is `editor::Cancel`. Binding Helix to `Cancel` isn't
an option, since once nothing is open it collapses the selections.

Pull the part of `Editor::cancel` that runs before it touches the
selections into `Editor::dismiss_overlays`, and call it when escape is
pressed in Helix normal mode. Selections are kept as before.

Closes #55197
2026-10-03 02:13:23 +02:00
upstream 134c5e9f71 Upstream zed-industries/zed state of the touched files before c15197ead3 2026-10-03 02:13:23 +02:00
dualfroz 3a969493f7 vim: Fix changing and deleting surrounding quotes on soft wrapped lines
`cs"` and `ds"` did nothing when the line was soft wrapped and the quotes
ended up on different display rows. Quote objects only match on a single
line, and the surround code checked that by comparing display rows of
the cursor and the found pair, so a soft wrapped line looked like several.
The pair itself is found in the buffer text and was already correct.

Compare buffer rows instead, in both `ds` and `cs`. This also covers
`AnyQuotes` and `MiniQuotes`, which go through the same check.

Closes #43069
2026-10-03 02:08:06 +02:00
upstream f63c81cdcd Upstream zed-industries/zed state of the touched files before e55b79eb25 2026-10-03 02:08:06 +02:00
dualfroz 0b2a8d3999 vim: Keep command palette matches next to filename completions
With vim or helix mode on, searching the command palette for "split
selection" showed only a `:split selection` entry and hid
`editor: split selection into lines`. The vim interceptor reads the query
as `:split <file>`, and its filename completions were marked exclusive,
which drops every regular match. The same happens for other searches
that start with a filename command, like "edit prediction".

Return the completions as non-exclusive, like every other intercepted
command. They are still listed first, so `:sp foo` + enter behaves the
same.

Closes #64431
2026-10-03 02:05:03 +02:00
upstream 6ff5c0da84 Upstream zed-industries/zed state of the touched files before d0a35c7366 2026-10-03 02:05:03 +02:00