Commit Graph
20 Commits
Author SHA1 Message Date
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
dualfroz 40b12a4e6c Fix shift-enter in buffer search with the JetBrains keymap
With the JetBrains base keymap, shift-enter in the buffer search query
inserted a newline instead of going to the previous match. The keymap
binds shift-enter to `editor::Newline` for auto-height editors, which
matches at the editor's depth, while its search bar binding only matched
at the `BufferSearchBar` level and lost to it. The default keymap's
`BufferSearchBar && !in_replace > Editor` binding loses too, since base
keymaps are loaded after it.

Bind it on the query editor itself, like the default keymaps and the
thread search binding right below it do, so it wins by coming later in
the same file.

Closes #62696
2026-10-03 02:02:28 +02:00
upstream a0a55b30d3 Upstream zed-industries/zed state of the touched files before 5769f6869d 2026-10-03 02:02:28 +02:00
dualfroz e3da47c875 terminal: Highlight links on ctrl/cmd-hover in mouse mode
When the running app had mouse reporting on, moving the pointer over a
link with ctrl/cmd held never underlined it, while pressing the modifier
with the pointer already on the link did. `mouse_move` only scheduled
the hyperlink lookup outside of mouse mode, but the modifier change and
grid refresh paths don't check it, and ctrl/cmd-click already opens
links in mouse mode through `open_links_in_mouse_mode`.

Also look up the hovered link in mouse mode when that setting is on,
after the motion has been reported to the app.

Closes #64102
2026-10-03 01:58:16 +02:00
upstream 8acb6f4d72 Upstream zed-industries/zed state of the touched files before 1194a05b08 2026-10-03 01:58:11 +02:00
dualfroz 76a28a2676 editor: Don't skip unnecessary errors and warnings in GoToDiagnostic
Go to next/previous diagnostic skipped every diagnostic tagged as
unnecessary, while the editor only drops the underline for unnecessary
diagnostics below warning severity. An error that is also tagged as
unnecessary, like an unused variable in Go, was shown with a red
squiggle but F8 jumped right past it.

Only skip unnecessary diagnostics that are faded out without an
underline, matching how they are rendered.

Closes #64790
2026-10-02 16:47:40 +02:00
upstream 64c48eedc9 Upstream zed-industries/zed state of the touched files before ce42164fb9 2026-10-02 16:47:40 +02:00
dualfroz ba0a85b19f util: Fix path truncation when the file name repeats in a parent dir
`PathWithPosition::parse_str` stripped the position suffix by searching
the whole path for the captured file name, so `foo/foo:10:2` was cut at
the first `foo` and parsed as `foo`. The same happened for
`main.rs-backup/src/main.rs:10:2`.

The captured file name is a slice of the last path component, so cut the
path right after it instead. Switching to `rsplit_once` would not work
either, since the last occurrence lands inside the position suffix for
numeric names like `1/1:1:1`.

Closes #64174
2026-10-02 16:43:56 +02:00
upstream f3eecab1c6 Upstream zed-industries/zed state of the touched files before c1ac0b23f7 2026-10-02 16:43:56 +02:00
dualfroz a83b8a1d3f Restore ctrl-alt-shift-o for opening remote projects on Linux
The frame overlay reset binding added in #62749 reused ctrl-alt-shift-o,
which Linux already binds to `projects::OpenRemote` in the workspace.
Since the dev binding has no context and the action is always handled,
it shadowed the remote dialog everywhere.

The same PR bound the reset action to ctrl-alt-shift-d on Windows, where
ctrl-shift-alt-o also opens remote projects, so use that chord on Linux
too.

Closes #63817
2026-10-02 16:40:51 +02:00
upstream a1e9721bf0 Upstream zed-industries/zed state of the touched files before 2ab87a4201 2026-10-02 16:40:37 +02:00
dualfroz d4a2eeba66 editor: Don't overwrite primary selection with only empty cursors
With several cursors and nothing selected, the per-selection text joined
into a string of newlines, which passed the `!text.is_empty()` check and
replaced the primary selection on every keystroke and cursor move.

Only write to the primary selection when at least one selection is
non-empty.

Closes #64446
2026-10-02 16:38:57 +02:00
upstream 16ea2153b4 Upstream zed-industries/zed state of the touched files before 35f256f943 2026-10-02 16:38:57 +02:00
dualfroz b5b736994e terminal: Send modifier sequences for the delete key
Delete with a modifier produced no input at all. Since the alt handling
was limited to single characters, alt-delete stopped sending the bogus
`ESC delete` and fell through to nothing, because delete was missing from
the modified special keys table next to insert, pageup and pagedown.

Modified delete now goes out as `CSI 3 ; <modifier> ~`, the same
encoding xterm and alacritty use.

Closes #64721
2026-10-02 16:36:22 +02:00
upstream 08029c4aa7 Upstream zed-industries/zed state of the touched files before 41f88af76a 2026-10-02 16:36:22 +02:00
dualfroz ee1e5ee696 openai_subscribed: Keep loading slow model catalogs in the background (#64925)
## Summary

The authenticated ChatGPT model catalog (`/backend-api/codex/models`)
can take ~30s to respond for some accounts. Zed aborted the request
after 5s, fell back to the built-in model list, and account-specific
models disappeared from the model selector.

Just raising the timeout would make credential loading and sign-in block
for that long, since both await model discovery. Instead, they still
wait at most 5s, but the request keeps running in the background for up
to 60s and replaces the available models once it completes.

Closes #64173

## Testing

- Added `test_slow_model_catalog_does_not_block_initial_load`: the
initial load finishes after 5s with the built-in models, and a catalog
response arriving 30s later replaces them.
- `cargo test -p openai_subscribed`, `./script/clippy -p
openai_subscribed`
- Not tested against the live endpoint.

## Self-review

- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [ ] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist). (N/A, no UI
changes)
- [x] Tests cover the new or changed behavior.

Release Notes:

- Fixed ChatGPT Subscription models disappearing when the model catalog
takes longer than 5 seconds to load.
2026-10-01 11:41:13 +00:00
upstream 3f619f2f8f Upstream zed-industries/zed state of the touched files before 4e76d6ef82 2026-10-01 11:41:13 +00:00