Commit log

a4fe57d Fix vim method/comment navigation with expanded diff hunks (#47976)

Click to expand commit body
Previously, `]m`/`[m` (method) and `]/`/`[/` (comment) motions would
navigate to incorrect positions when diff hunks were expanded. This was
caused by extracting raw `usize` values from `MultiBufferOffset` and
operating directly on the underlying buffer, which doesn't account for
expanded diff hunk content.

The fix properly uses `MultiBufferOffset` throughout and queries
`text_object_ranges` on the `MultiBufferSnapshot` instead of the
underlying buffer, ensuring correct coordinate mapping when diff content
is displayed inline.

Fixes #46612

Release Notes:

- Fixed vim method and comment navigation (`] m`, `[ m`, `] shift-m`, `[
shift-m`, `] /`, `[ /`) incorrectly positioning cursor when diff hunks
are expanded

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: dino <dinojoaocosta@gmail.com>

lex00 , Claude Opus 4.5 , and dino created

be8842b agent_ui: More refactors (#48186)

Click to expand commit body
Release Notes:

- N/A *or* Added/Fixed/Improved ...

---------

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>

Cameron Mcloughlin , Ben Brandt , and Bennet Bo Fenner created

9c3ae09 Improve icon selection for edit prediction providers (#47911)

Click to expand commit body
Release Notes:

- N/A

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>

versecafe and Danilo Leal created

e99c11d build: Decouple git_ui from recent_projects (#48062)

Click to expand commit body
- **git_ui: Decouple git_ui from the recent_projects crate**
- **Move git_ui closer to editor**

Release Notes:

- N/A

Piotr Osiewicz created

e74ceba agent_ui: Disable "Copy Selection" when no text is selected (#47997)

Click to expand commit body
Release Notes:

- Agent: Improved the "Copy Selection" right-click menu item by
disabling it when there are no selections.

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>

Xiaobo Liu created

33fbc71 docs: Document visual mode bindings for multi-line insert/append (#48156)

Click to expand commit body
Closes #44420 

Added instructions and example keybindings to enable multi-cursor insert
(`shift-i`) and append (`shift-a`) actions in visual mode, making it
easier for users to perform these actions on multiple lines
simultaneously.

Release Notes:

- N/A

---------

Co-authored-by: Kunall Banerjee <hey@kimchiii.space>

Artem Molonosov and Kunall Banerjee created

431c623 workspace: Add copy button to ErrorMessagePrompt popup (#48107)

Click to expand commit body
My own uncreated issue. Super simple QOL change.
Just needed to copy errors and the only other place I'm aware of is
console.

The text inside the error popup is not selectable (at least on macos)


before:
<img width="461" height="213" alt="image"
src="https://github.com/user-attachments/assets/f0cc4239-759c-4e1e-aae0-d2908a81cdc6"
/>

after:
<img width="482" height="233" alt="image"
src="https://github.com/user-attachments/assets/61d458cc-3c25-4c1c-8bd7-3d6b83a51d28"
/>

Release Notes:

- Added `CopyButton` to `ErrorMessagePrompt`

Dawid Harat created

9ee0f08 agent_ui: Fix panic when inserting context prefix with multi-byte characters (#48179)

Click to expand commit body
Closes ZED-4R9

Introduced in https://github.com/zed-industries/zed/pull/47768

The `insert_context_prefix` function was using byte offsets to check if
the prefix already exists at the cursor. This caused a panic with
multi-byte characters like emojis. Now uses character counts instead.

Release Notes:

- Fixed a crash in the Agent Panel when inserting context mentions with
emojis in the message editor.

Smit Barmase created

6d77257 terminal_view: Add support for opening the terminal in the current file directory (#47739)

Click to expand commit body
Closes #14863

Changes:
- Added `CurrentFileDirectory` variant to the `WorkingDirectory` enum.
- New terminals now open in the directory of the currently active file
when this option is set.
- Falls back to project directory, then first workspace directory if no
file is active.

Release Notes:

- Added `current_file_directory` option for terminal's
`working_directory` setting. Set `"working_directory":
current_file_directory"` to open new terminals in the directory of your
currently open file.

---

Still relatively new to Rust, so happy to receive any feedback! 😁

Ruben Fricke created

782f91f Fix launching from WSL with fish as default shell (#48136)

Click to expand commit body
Closes #46801

When connecting to WSL2 with fish as the default shell, Zed gets stuck
at "Starting proxy". The connection works fine when bash is the default
shell.

In `start_proxy()`, the WSL command was being invoked with:

```rust
let proxy_process = match wsl_command_impl(&self.connection_options, "env", &proxy_args, false)
```

Changing the last argument to true invokes the WSL command with `--exec`
flag which executes the command in the WSL environment without spawning
a new shell.

With above fix I can launch Zed from WSL (Arch) with fish.

andreasp created

af0e45e terminal: Prevent terminal cursor stretching by always using cell width (#45545)

Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/8516

Release Notes:

- Prevent terminal cursor stretching by always using cell width.

Rocky Shi created

9b1fca4 docs: document right options for `lsp_document_colors` (#48170)

Click to expand commit body
This probably should have been updated when
https://github.com/zed-industries/zed/pull/32816 landed.

Release Notes:

- N/A

Kunall Banerjee created

0e118ac project: Simplify file search logic (#47982)

Click to expand commit body
Release Notes:

- N/A

Xiaobo Liu created

aafecf0 vim: Respect search settings in buffer search (#48127)

Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/48007

Release Notes:

- Fixed Vim search not respecting `"search"` default settings

---------

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>

Xiaobo Liu created

b874a40 ep: Add V0131GitMergeMarkersPrefix prompt format (#48145)

Click to expand commit body
Release Notes:

- N/A

Oleksiy Syvokon created

fb428b5 gpui: Rewrite Windows `PlatformTextSystem` for better performance (#48087)

Click to expand commit body
The current setup is quite a mess, allocates a ton of unnecessary heap
data when rendering text or querying font info and not really caching
things well, this PR changes that.

Release Notes:

- N/A *or* Added/Fixed/Improved ...

Lukas Wirth created

2570382 git: Disable vertical scrollbar for side-by-side diff LHS (#48129)

Click to expand commit body
Also the minimap, although this is currently symbolic since the minimap
doesn't support multibuffers.

Release Notes:

- N/A

Cole Miller created

f7fe618 Implement `extract_pull_request` for GitLab provider (#47973)

Click to expand commit body
Fixes #38709

## Summary
This implements the `extract_pull_request` method for GitLab's
`GitHostingProvider` trait, enabling merge request links to be shown in
the git blame hover popover.

## Implementation
The implementation parses GitLab MR references from commit messages
using a regex that matches two common patterns:

1. **Squash merge pattern**: `message (!123)` - When GitLab
squash-merges, it appends the MR number in parentheses
2. **Standard merge commit**: `See merge request group/project!123` -
The default merge commit message

## Tests Added
- `test_extract_merge_request_from_squash_commit` - Validates the
`(!123)` pattern
- `test_extract_merge_request_from_merge_commit` - Validates the `See
merge request` pattern
- `test_extract_merge_request_self_hosted` - Ensures it works with
self-hosted GitLab instances
- `test_extract_merge_request_no_match` - Confirms None is returned for
non-matching messages

## Related
This follows the same pattern as the GitHub provider implementation.

## Release Notes

- Added support for GitLab merge request links in git blame hover
popover

littleKitchen created

839b4f1 git: Fix stage/unstage failure with a large number of files (#47800)

Click to expand commit body
Git commands can fail when staging or unstaging a very large number of
files because each file path is passed as a separate CLI argument. Once
the argument list grows beyond the OS limit, git errors with Argument
list too long (os error 7).

Since git 2.26, pathspecs can be read from stdin, which lets us avoid
passing thousands of paths as arguments and bypass this limitation.

I looked for existing issues related to this but couldn’t find any.

Repro:

- Clone rust-lang repo
- Delete root tests folder
- Try to stage or unstage (40,000+ files)
- Git fails with Argument list too long (os error 7)

Release Notes:

- Fixed an issue where stage/unstage could fail when operating on a very
large number of files

Marco Mihai Condrache created

c2959a7 git: Disable folding in side-by-side diff (#48108)

Click to expand commit body
At least for now this isn't supported by the alignment system.

Release Notes:

- N/A

Cole Miller created

48f712b Fix git panel not updating after commit (#47222)

Click to expand commit body
Fixed git panel not update after commit or switch branch on Linux.

On macOS and Windows, the watcher implementation recursively watches
subdirectories.
On Linux, the watcher is non-recursive.

In Git worktree scenarios, only `<project>/.git` is watched, but the
actual worktree Git directory
`<project>/.git/worktrees/<worktree>`  is not.
Therefore, Git operations such as commits or branch switches inside a
worktree do not emit watcher events on Linux, causing the Git panel to
stay out of sync.

Release Notes:
- Fixed git panel not update after commit or switch branch on Linux with
git worktrees.

feeiyu created

d6eda52 Add Azure as a git provider (#47598)

Click to expand commit body
Release Notes:

- Azure is now a supported Git provider

Marco Mihai Condrache created

a2dbf04 git_ui: Open file on double-click in status list (#47989)

Click to expand commit body
Release Notes:

- Improved open file on double-click in status list

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>

Xiaobo Liu created

2867ec4 git: Fix force-added files always showing as ignored (#47057)

Click to expand commit body
Closes #15231
changes the priority in the way files are color-labelled..making sure
forcely added files are highlighted appropriately.
Release Notes:

- N/A *or* Added/Fixed/Improved ...

prayansh_chhablani created

9101f0f git_ui: Fix visual optimistic staging bug for tree view (#48078)

Click to expand commit body
Before this PR we would not show the placeholder for the parent folders
of a file entry inside the git tree view. This PR fixes that so it's
visually correct.

**Before**


https://github.com/user-attachments/assets/3d0988de-f43b-4b2d-8f90-c531316ab290

**After**


https://github.com/user-attachments/assets/e28f9eba-e301-4f9a-8647-7f1f2f12f87d

Release Notes:

- Git UI: Fix optimistic placeholder for folders in the three view

Remco Smits created

608cc99 git: Remove panes from SplittableEditor (#48102)

Click to expand commit body
Vestigial from the old UI

Release Notes:

- N/A

Cole Miller created

36e35f7 git: Use CDN endpoint for GitHub avatars to avoid rate limiting (#47894)

Click to expand commit body
GitHub's commit API endpoint is rate limited to 60 requests/hour for
unauthenticated users. This causes avatar loading to fail after toggling
blame a few times.

This PR uses GitHub's CDN avatar endpoint
`https://avatars.githubusercontent.com/u/e?email={email}&s=128` instead,
which doesn't count against API rate limits. The author email is already
available from local git data (blame output), so
  no API calls are needed.

- When author email is available, constructs the CDN URL directly (zero
API calls)
  - Falls back to existing API-based behavior when email is unavailable
  - Adds unit tests for URL construction

  Closes #47590

  ## Test plan
  - [x] `./script/clippy` passes
- [x] `cargo test -p git_hosting_providers` passes (89 tests including 3
new ones i added)
- [ ] Manual test: Open a file, toggle git blame, verify avatars load
without hitting rate limits

  Release Notes:

- Fixed GitHub avatar rate limiting in git blame by using CDN endpoint
instead of API calls (#47590)

Augustus Otu created

8d18b7b git: Fix desynced scrolling between LHS and RHS of side-by-side diff (#47913)

Click to expand commit body
- Remove old attempt to sync scrolling
- Share a `ScrollAnchor` between the two sides, and be sure to resolve
it against the correct snapshot
- Allow either side to initiate an autoscroll request, and make sure
that request is processed in the same frame by the other side

Release Notes:

- N/A

---------

Co-authored-by: cameron <cameron.studdstreet@gmail.com>
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
Co-authored-by: Jakub <jakub@zed.dev>

Cole Miller , cameron , Zed Zippy , and Jakub created

b642565 Allow zeta2 to predict next cursor position along with edits (#47916)

Click to expand commit body
* [x] capture and store teacher model's predicted cursor position
* [x] provide cursor position to student during distillation
* [x] eval cursor positions
* [x] parse and apply cursor position predictions at runtime

Release Notes:

- N/A

Max Brunsfeld created

795eb34 Fix open path prompt not showing hidden files (#46965)

Click to expand commit body
Closes #39036 

The open path prompt will now show hidden files when "." is entered.
Also fixes an issue with "open this directory" showing twice when used
by the "toolchain: add toolchain" prompt.

With a tree of 
```
zed-industries
β”œβ”€β”€ .hidden
β”œβ”€β”€ .hidden-file
β”œβ”€β”€ zed
β”œβ”€β”€ zed-working
β”œβ”€β”€ zeta
└── zeta-dataset
```
**Before:**
<img width="656" height="174" alt="image"
src="https://github.com/user-attachments/assets/abf30ce3-b1c2-4a14-a45d-c17b6c3aef6f"
/>

**After (current directory view without inputting "."):**
<img width="648" height="261" alt="image"
src="https://github.com/user-attachments/assets/00c65546-32c1-4c85-a05c-53152ab2f942"
/>

**After (when inputting "." to see hidden entries):**
<img width="618" height="156" alt="image"
src="https://github.com/user-attachments/assets/8453ae89-b1a7-44d4-9f7d-ed89e55a7020"
/>


Release Notes:
- Made Zed's built in file picker to show all hidden files by default

Austin Cummings created

03663b9 rust: Highlight enum variants as variant (#47918)

Click to expand commit body
Improve #45546, by changing the capture to be variant instead of type.

Release Notes:

- Improved Rust enum variant highlighting as variant instead of type.

Before (note variants have the same style as `Foo`):
<img width="276" height="162" alt="image"
src="https://github.com/user-attachments/assets/fa0d8f48-a286-4a8d-b89d-269cb1657e55"
/>

After:
<img width="276" height="162" alt="image"
src="https://github.com/user-attachments/assets/c442494a-7550-481a-a8b9-f2d944a67868"
/>

Michael Yang created

4dde88c languages: Support double quoted keys in YAML highlights (#48063)

Click to expand commit body
Before:
<img width="520" height="74" alt="before"
src="https://github.com/user-attachments/assets/5c010819-a20e-438e-b7f6-218b9f241070"
/>

After:
<img width="532" height="81" alt="after"
src="https://github.com/user-attachments/assets/51528d3b-439f-4fcf-9a7c-b06dec6a7e81"
/>

Release Notes:

- Improved YAML highlights to support quoted keys

Co-authored-by: ozacod <ozacod@users.noreply.github.com>

ozacod and ozacod created

a6ab1f1 Fail windows bundle when cargo about fails (#48056)

Click to expand commit body
Release Notes:

- N/A

Conrad Irwin created

fe653a7 settings_ui: Fix editable project settings not being updated when a new workspace is created (#47992)

Click to expand commit body
The bug occurred because `cx.observe_new::<Workspace>` would pass a
mutable `Window` that was also the new workspace's window. Later,
`fetch_files` would fail to read the newly created workspace from
`WorkspaceStore` because its window already had a mutable reference to
it.

The fix always passes the Settings UI's window handle to the
`fetch_files` function, and uses a `settings_window_handle.defer`
callback to call `fetch_files` after the newly created workspace's
window no longer has any mutable references to it.

Release Notes:

- settings_ui: Fixed editable project settings not being updated when a
new workspace is created

Anthony Eid created

609e915 vim: Restore cursor position when dismissing buffer search (#47732)

Click to expand commit body
Fixes #8048

## Summary

In vim mode, pressing Escape to dismiss the buffer search now correctly
restores the cursor to its original position, rather than leaving it at
the first match.

## Problem

When using vim's `/` command to search:
1. User positions cursor at line X
2. User presses `/` to open search, types a query
3. Matches are highlighted, cursor may visually jump to first match
4. User presses Escape to dismiss without navigating
5. **Bug:** Cursor ends up at first match instead of line X

This breaks vim parity where Escape should cancel the search and restore
cursor position.

## Solution

The fix leverages the `focused()` callback in `vim.rs`, which is called
when the editor regains focus after the search bar is dismissed.

**Key insight:** When search starts via `/`, the cursor position is
saved in `SearchState.prior_selections`. When search is *submitted* with
Enter, `search_submit()` drains these selections. But when search is
*dismissed* with Escape, they remain.

So in `focused()`, if:
- `prior_selections` is non-empty, AND
- The search bar's `is_dismissed()` returns true

...then we know the user dismissed the search (Escape) rather than
submitted it (Enter), and we restore the cursor.

## Why not handle `buffer_search::Dismiss` directly?

The initial approach tried to register a vim handler for the `Dismiss`
action. This didn't work because when Escape is pressed, the search bar
(which has focus) handles the `Cancel` action internally and calls its
`dismiss()` method directlyβ€”it doesn't dispatch `Dismiss` through the
action system. The vim handler registered on the editor was never
invoked.

## Test Plan

- Added `test_search_dismiss_restores_cursor` β€” verifies cursor
restoration when search is dismissed
- Added `test_search_dismiss_restores_cursor_no_matches` β€” verifies
behavior when query has no matches
- All 455 vim tests pass
- Manual testing confirms fix works with both `/` and `cmd-f`

## Release Notes

- Fixed vim mode: cursor now returns to original position when
dismissing buffer search with Escape (#8048)

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>

lex00 and Claude Opus 4.5 created

72b151e Revert "Allow always_allow patterns for Nushell, Elvish, and Rc shells" (#48050)

Click to expand commit body
Reverts zed-industries/zed#47908

This PR inadvertently caused a regression:

- https://github.com/zed-industries/zed/issues/48047

Joseph T. Lyons created

cfd6144 ep_cli: Only check cursor excerpt for reversals (#48044)

Click to expand commit body
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...

Ben Kunkle created

3a2a43a ep_cli: Allow dynamically loading prompts (#48046)

Click to expand commit body
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...

Ben Kunkle created

b029238 settings: Extract project settings JSON schema (#47939)

Click to expand commit body
Introduces a separate JSON schema for project settings that excludes
user-only settings like `auto_update`, `telemetry`, `vim_mode`, etc.
This provides more accurate autocomplete and validation when editing
`.zed/settings.json`.

- Add `SettingsStore::project_json_schema`
- Map `.zed/settings.json` to `zed://schemas/project_settings` schema URL

Release Notes:

- Improved autocomplete for the project settings file
(`.zed/settings.json`) to only include settings that are valid at the
project level, excluding user-only settings.

Dino created

325afbd API-based version of duplicates bot (#48041)

Click to expand commit body
This is still only a debugging/evaluation version (which is why it has
e.g. hardcoded stuff). It successfully ran a few times triggered
manually, so we're replacing the broken version on `main` with this to
see how it fares on incoming issues.

Release Notes:

- N/A

Lena created

a7596c4 Bump wax to 0.7 (#48042)

Click to expand commit body
Closes #47756
Closes ZED-3WQ

Release Notes:

- N/A

Cole Miller created

3d7fe6e agent_ui: Add debug command to copy and paste agent threads (#48039)

Click to expand commit body
Temporary feature meant to aid with internal performance debugging

Release Notes:

- N/A *or* Added/Fixed/Improved ...

Lukas Wirth created

3723a25 repl: Render `application/json` media types from Jupyter kernels (#47905)

Click to expand commit body
Closes #47757

Component of https://github.com/zed-industries/zed/issues/9778

<img width="799" height="913" alt="image"
src="https://github.com/user-attachments/assets/ac496987-bf03-4ea4-99f0-d327e57e7b20"
/>

Release Notes:

- Added JSON output support to REPL

Kyle Kelley created

7aa8c74 Add `ep split --no-stratify` option (#48036)

Click to expand commit body
Release Notes:

- N/A

Oleksiy Syvokon created

fa68aa7 ep_cli: Further improve reversal ratio (#48028)

Click to expand commit body
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...

Ben Kunkle created

c3ce20b ep: Update teacher prompt to reduce edit reversals (#48022)

Click to expand commit body
Release Notes:

- N/A

Oleksiy Syvokon created

e80221d multi_buffer: Reduce region clones (#48025)

Click to expand commit body
Release Notes:

- N/A *or* Added/Fixed/Improved ...

Lukas Wirth created

9b3777a multi_buffer: Speed up `Anchor::to_offset` resolution (#48021)

Click to expand commit body
We used to just use the anchor resolution function that allows resolving
multiple anchors in one loop before. That has a lot of overhead though
when we only have a single anchor to resolve, so instead we just
specialize that case now as resolving a single anchor to an offset is a
super common operation.

Release Notes:

- N/A *or* Added/Fixed/Improved ...

Lukas Wirth created

316a970 workspace: Fix closed pane items not reopening due to stale preview state (#45286)

Click to expand commit body
Closes #45198

Release Notes:

- Fixed an issue where "Reopen Closed Item" would fail to reopen tabs
that had been converted from preview to non-preview before being closed.

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>

Mayank Verma and Smit Barmase created

024345f editor: Deduplicate multibuffer blame error messages (#48013)

Click to expand commit body
Release Notes:

- N/A *or* Added/Fixed/Improved ...

Lukas Wirth created