Commit log

9ecafe1 vim: Ensure paragraph motions use empty and not blank lines (#47734)

Click to expand commit body
The `}` and `{` paragraph motions now correctly treat only truly empty
lines (zero characters) as paragraph boundaries, matching vim's
documented behavior. Whitespace-only lines are no longer treated as
boundaries.

Changed `start_of_paragraph()` and `end_of_paragraph()` in
`editor/src/movement.rs` to check `line_len() == 0` instead of
`is_line_blank()`.

Note: This change does NOT affect the `ap`/`ip` text objects. Per vim's
`:help ap`, those DO treat whitespace-only lines as boundaries, which is
the existing (correct) behavior in `vim/src/object.rs`.

Closes #36171

Release Notes:

- Fixed vim mode paragraph motions (`}` and `{`) to correctly ignore
whitespace-only lines

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>

lex00 and dino created

757ee05 ep: Use rejected_output for DPO training + OpenAI support (#47697)

Click to expand commit body
Release Notes:

- N/A

---------

Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>

Oleksiy Syvokon and Zed Zippy created

4866861 xtask: Remove transitive GPUI dependency (#47748)

Click to expand commit body
Release Notes:

- N/A

Finn Evers created

8fb7108 askpass: Fix ssh auth not updating entered password on windows (#47755)

Click to expand commit body
Release Notes:

- Fixed mistyping the ssh password in the askpass prompt on windows
locking you out of retyping the correct one

Lukas Wirth created

aa6afca terminal_view: Fix new flaky terminal tests (#47753)

Click to expand commit body
Release Notes:

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

Lukas Wirth created

7e8ced2 Remove cron schedule for unit evals (#47743)

Click to expand commit body
Release Notes:

- N/A

Ben Brandt created

e4dff26 extension_ci: Use different target for nextest (#47738)

Click to expand commit body
Release Notes:

- N/A

Finn Evers created

969fb8f Fix native agent thread history notify refresh (#47733)

Click to expand commit body
Release Notes:

- N/A

Joseph T. Lyons created

58a4a84 terminal_view: Add ability to rename terminal tabs (#45800)

Click to expand commit body
Closes [#ISSUE](https://github.com/zed-industries/zed/issues/11023)

Release Notes:

- Added ability to rename terminal tabs by right-click context menu and
double-click

Recording:


https://github.com/user-attachments/assets/be81a95b-1f64-4ebd-94e4-7cfe6a1e9ddb

Rocky Shi created

b6ff556 go: Add support for running sub-tests in table tests without explicit variables for test cases (#46645)

Click to expand commit body
This PR extends support to run Go table-test subtests (#35657), handling
tests without explicitly declaring variables for test scenarios.

<img width="611" height="318" alt="go-table-tests"
src="https://github.com/user-attachments/assets/e001b661-b512-4183-b6df-6c25f3af4f27"
/>

Release Notes:

- Improved support to run Go table-test subtests, handling tests without
explicitly declaring variables for test scenarios.

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>

Lev Zakharov and Conrad Irwin created

e64985e Add optional relative line jumps to go-to-line action (#46932)

Click to expand commit body
Implements relative line jumping, a common feature i missed from
Vim/Neovim where you can jump to lines relative to your current cursor
position.

- New `{"relative": true}` flag for `go_to_line::Toggle` action 
- Supports both `-5` (5 lines up) and `b5` (backward 5 lines) syntax
- Full lines only (no column support in relative mode, wasnt sure if
that would be necessary)
- Unbound by default - users can add e.g. `"ctrl-j":
["go_to_line::Toggle", {"relative": true}]` to their keymap

Example usage:
- `5` β†’ jump 5 lines down
- `-3` or `b3` β†’ jump 3 lines up  
- `0` β†’ stay on current line


[Screencast_20260115_191312.webm](https://github.com/user-attachments/assets/395c0e7b-8ac1-48c8-a39e-5ade4f9206ec)

Release Notes:

- Added relative line jump support to go-to-line action via
`+/-/f/b/F/B`

Kalaay created

8e291ec encoding: Add "reopen with encoding" (#46553)

Click to expand commit body
# Add "Reopen with Encoding" feature (Local/Single user)

## Summary

This PR adds a "Reopen with Encoding" feature to allow users to manually
specify an encoding and reload the active buffer.

This feature allows users to explicitly specify the encoding and reload
the file to resolve garbled text caused by incorrect detection.

## Changes

1.  Added encoding picker logic to `encoding_selector`

- Implemented a modal UI accessible via the command palette, shortcuts,
or by clicking the encoding status in the status bar.
- Allows users to select from a list of supported encodings (Shift JIS,
EUC-JP, UTF-16LE, etc.).

2.  Updated Buffer logic (crates/language)

- Added a `force_encoding_on_next_reload` flag to the Buffer struct.
- Updated the `reload` method to check this flag and apply the following
logic:
- **Non-Unicode (e.g., Shift JIS):** Bypasses heuristics (like BOM
checks) to force the specified encoding.
- **Unicode (e.g., UTF-8):** Performs standard BOM detection. This
ensures that the BOM is correctly handled/consumed when switching back
to UTF-8.

3.  UI / Keymap

- Made the encoding status in the status bar (ActiveBufferEncoding)
clickable.
- Added default keybindings:
  - macOS: cmd-k n
  - Linux/Windows: ctrl-k n
  - Windows: ctrl-k n

## Limitations & Scope

To ensure stability and keep the PR focused, the following scenarios are
intentionally out of scope:

1. **Collaboration and Remote Connections**

- Encoding changes are disabled when collaboration (is_shared) or SSH
remote connections (is_via_remote_server) are active.
- **Reason:** Synchronizing encoding state changes between host/guest or
handling remote reloads involves complex synchronization logic. This PR
focuses on local files only.

`Remote Connection (SSH/WSL)`

|Via status bar|Via shortcut/command|
|:---:|:---:|
|<img width="767" height="136" alt="remote_tooltip"
src="https://github.com/user-attachments/assets/6c7cb293-2486-4f6d-a3ff-2086d939398e"
width="400" />|<img width="742" height="219" alt="remote_shortcut"
src="https://github.com/user-attachments/assets/5448f199-2066-4baf-b349-a983ab2fa77a"
width="400" />|

`Collaboration Session `

|Via status bar|Via shortcut/command|
|:---:|:---:|
|<img width="734" height="86" alt="collab_tooltip"
src="https://github.com/user-attachments/assets/37de99a9-dd33-4c78-98bf-20654d41fdd0"
/>|<img width="720" height="182" alt="collab_pop"
src="https://github.com/user-attachments/assets/91d03ea7-f029-442a-8236-55234576f7ed"
/>|

2. Dirty State

- The feature is disabled if the buffer has unsaved changes to prevent
data loss during reload.

|Via status bar|Via shortcut/command|
|:---:|:---:|
|<img width="545" height="103" alt="local_dirty_tooltip"
src="https://github.com/user-attachments/assets/d9ae658e-52b3-4ecd-9873-d0ec8bd51b5d"
/>|<img width="707" height="178" alt="local_dirty_pop"
src="https://github.com/user-attachments/assets/d170ea1e-9fcb-42e7-aa3e-0555b4a19d86"
/>|

3. Files detected as Binary

Files that worktree detects as "binary" (e.g., UTF-16 files without BOM
containing non-ASCII characters) are not opened in the editor, so this
feature cannot be triggered.
**Future Work**: Fixing this would require modifying crates/worktree
heuristics or exposing a "Force Open as Text" action for InvalidItemView
to trigger. Given the scope and impact, this is deferred to a future PR.

## Test Plan

I verified the feature and BOM handling using the following scenarios:

### Preparation

Used the following test files:

-
[**test_utf8.txt**](https://github.com/user-attachments/files/24548803/test_utf8.txt):
English-only text file. No BOM.
-
[**test_utf8_bom.txt**](https://github.com/user-attachments/files/24548822/test_utf8_bom.txt):
English-only text file. With BOM.
-
[**test_utf8_jp_bom.txt**](https://github.com/user-attachments/files/24548825/test_utf8_jp_bom.txt):
UTF-8 with BOM file containing Japanese characters.
-
[**test_shiftjis_jp.txt**](https://github.com/user-attachments/files/24548827/test_shiftjis_jp.txt):
Shift-JIS file containing Japanese characters (content designed to
trigger misdetection, e.g., using only half-width katakana).

Used an external editor (VS Code or Notepad) for verification.

### Case 1: English-only file behavior

1.  Open an English-only UTF-8 file (test_utf8.txt).
2.  Reopen as Shift JIS.
3.  **Result:**

- Text appearance remains unchanged (since ASCII is compatible).
- Status bar updates to "Shift JIS".

### Case 2: Fixing Mojibake

1. Open a Shift-JIS file (test_shiftjis_jp.txt) that causes detection
failure.
    β€»Confirm it opens with mojibake
2.  Select Shift JIS from the status bar selector.
3.  **Result:**

- Mojibake is resolved, and Japanese text is displayed correctly.
- Status bar updates to "Shift JIS".

### Case 3: Unicode file with BOM behavior

1.  Open an English-only UTF-8 with BOM file (test_utf8_bom.txt).
2.  Reopen as `Shift JIS`.
3.  **Result:**

- The BOM bytes are displayed as mojibake at the beginning of the file.
- The rest of the English text is displayed normally (ASCII
compatibility).
- Status bar updates to "Shift JIS".

### Case 4: Non-Unicode file with BOM behavior

1. Open a UTF-8 with BOM file containing Japanese
(test_utf8_jp_bom.txt).
2.  Reopen as Shift JIS.
3.  **Result:**

- The BOM bytes at the start are displayed as mojibake.
- The Japanese text body is displayed as mojibake (UTF-8 bytes
interpreted as Shift JIS).
- Status bar updates to "Shift JIS" (no BOM indicator).

### Case 5: Revert to Unicode

1.  From the state in Case 4 (Shift JIS with mojibake), reopen as UTF-8.
2.  **Result:**

- The BOM mojibake at the start disappears (consumed).
- The text returns to normal.
- Status bar updates to "UTF-8 (BOM)".

### Case 6: External BOM removal (State sync)

1.  Open a UTF-8 with BOM file in Zed (test_utf8_bom.txt).
2. Open the same file in an external editor and save it as UTF-8 (No
BOM).
3.  Refocus Zed.
4.  **Result:**

- Text appearance remains unchanged.
- The (BOM) indicator disappears from the status bar.
- Saving in Zed and checking externally confirms the BOM is gone.

### Case 7: External BOM addition

1. From the state in Case 6 (UTF-8 No BOM), save as UTF-8 with BOM in
the external editor.
2.  Refocus Zed.
3.  **Result:**

- The (BOM) indicator appears in the status bar.
- Saving in Zed and checking externally confirms the BOM is present.

### Case 8: External Encoding Change (Auto-detect sync)

1.  Open an English-only UTF-8 file in Zed (`test_utf8.txt`).
    * *Status bar shows: "UTF-8".*
2. Open the same file in an external editor and save it as **UTF-16LE
with BOM**.
3.  Refocus Zed.
4.  **Result:**
    * The text remains readable (no mojibake).
* **Status bar automatically updates to "UTF-16LE (BOM)".** (Verifies
that `buffer.encoding` is correctly updated during reload).

Release Notes:

- Added "Reopen with Encoding" feature (currently supported for local
files).

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>

Ichimura Tomoo and Conrad Irwin created

e868446 Reapply "Try namespace mac runners (#47675)" (#47721) (#47727)

Click to expand commit body
This reverts commit c50120199f4211d6bcbd3fb191b710166e34d9c7.

Closes #ISSUE

Release Notes:

- N/A

Conrad Irwin created

d0c3b33 git: Don't rebuild the project diff when the active repository changes (#47718)

Click to expand commit body
Release Notes:

- N/A

Cole Miller created

786b17d git: Retain "since" diffs in the `GitStore` (#47619)

Click to expand commit body
This PR makes it so that `open_diff_since`, as used by the branch diff,
is able to return a stable diff entity instead of creating a new one
every time this is called. In particular, the base text buffer for this
diff is now stable across branch diff refreshes, making it usable with
the side-by-side view. The strategy for keeping the diff entities alive
is the same one that we use for the uncommitted and unstaged diffs--the
`GitStore` only holds a weak pointer to each "since" diff, so when these
diffs are no longer in use by the branch diff multibuffer they can be
cleaned up.

Release Notes:

- N/A

---------

Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>

Cole Miller and Zed Zippy created

00ba24a git: Avoid unwrapping active repository in panel rendering (#47700)

Click to expand commit body
Closes ZED-43V
Closes ZED-3VK

Release Notes:

- N/A

Cole Miller created

c93773c Make `workspace::SendKeystrokes` not use layout key equivalents (#47061)

Click to expand commit body
Closes #46509

Release Notes:

- Fixed: `workspace::SendKeystrokes` would not allow remapping keys in
different keyboard layouts

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>

everdrone and Conrad Irwin created

c501201 Revert "Try namespace mac runners (#47675)" (#47721)

Click to expand commit body
This broke the libgit2 bundling silently

Release Notes:

- N/A

Conrad Irwin created

d27fa3b extension_ci: Ensure specified target is installed (#47717)

Click to expand commit body
Follow up to #47714 because it is still broken for the extension
workflows post #47699 cache introduction. Keeping the cache around
though in the hopes that it will now finally work.

Release Notes:

- N/A

Finn Evers created

e7e8f0b extension_ci: Set default toolchain for all jobs (#47714)

Click to expand commit body
Follow-up to #47712 ..

Release Notes:

- N/A

Finn Evers created

bdb8481 Send some traffic to zeta2 for testing (#47710)

Click to expand commit body
Release Notes:

- N/A

Max Brunsfeld created

7a0a26d extension_ci: Set default target for all jobs (#47712)

Click to expand commit body
Following the changes to the namespace caching, CI in the extensions
broke because cache conflicts arose there seemingly. Trying to set the
target here more explicitly in an effort to fix this.

Release Notes:

- N/A

Finn Evers created

f601880 project: Add spinner while search is underway (#47620)

Click to expand commit body
When there are no search results, it's clear that a search is still
ongoing because the landing page says "Searching...". However, once
there's at least one result found, it becomes completely unclear when
search is actually finished. This adds a spinner immediately to the
right of the result counter that stops once the search is finished.


https://github.com/user-attachments/assets/a0ca4e2a-c506-42a4-bc4b-c1eb32d69e79

Release Notes:

- Added spinner to project search, indicating that a search is still
ongoing.

---------

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

Andres Suarez and Danilo Leal created

0db0cc6 Handle removed `IconName` variants in text thread deserialization (#47624)

Click to expand commit body
Fixes #41776

## Problem

Old AI Text Thread sessions fail to open from History because the
deserializer fails on unknown icon variants. When icons are removed or
renamed in refactors, old saved threads become unloadable with errors
like:

```
unknown variant `AtSign`, expected one of `Ai`, `AiAnthropic`...
```

## Solution

Added a lenient deserializer for the `icon` field in
`SlashCommandOutputSection` that falls back to `IconName::Code` for
unknown variants.

This ensures old saved threads remain loadable even as icons are
added/removed from the codebase.

## Test Plan

- Added unit test for valid icon deserialization
- Added unit test for unknown icon fallback to `Code`
- Added unit test for various unknown icon variants
- Added unit test confirming serialization unchanged
- All tests pass: `cargo test -p assistant_slash_command`

Release Notes:

- Fixed old AI text thread sessions failing to open from History when
they contain icons that were removed in previous updates.

πŸ€– Generated with [Claude Code](https://claude.ai/code)

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: MrSubidubi <finn@zed.dev>

lex00 , Claude Opus 4.5 , and MrSubidubi created

40e7b10 extension_ci: Bump timeout for extension bundling test (#47708)

Click to expand commit body
Similar to the last bump, bumps the timeout here so that jobs have a bit
more time to complete

Release Notes:

- N/A

Finn Evers created

b02192a ep_cli: Add reversal metric (#47689)

Click to expand commit body
Closes #ISSUE

Measure the model reversing user edits programatically, for a more
robust and consistent measurement than LLM-as-judge

Release Notes:

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

Ben Kunkle created

21db564 ci: Cache Rust toolchains in Linux namespace cache (#47699)

Click to expand commit body
Release Notes:

- N/A

Piotr Osiewicz created

2b45efc Try namespace mac runners (#47675)

Click to expand commit body
Closes #ISSUE

Release Notes:

- N/A

Conrad Irwin created

18bc268 Fix extraction of Windows remote server (#47690)

Click to expand commit body
Release Notes:

- N/A

John Tur created

b9233da Cap number of saved hang traces at 3 (#47674)

Click to expand commit body
Prevents unbounded grown of the `hang_traces` directory.

Release Notes:

- Fixed excessive disk space usage from the `hang_traces` directory.

Cole Miller created

f73242a Return to Keep/Reject for agent edits (#47688)

Click to expand commit body
This essentially reverts 2a83c6907cf0850ad425f97b8debdd7bdf016a95 and
d35fee1cd131df90d1e14e06ec75f7d1c0a3bcf6

Release Notes:

- N/A

Michael Benfield created

d1f7c24 helix: Fix normal-mode selection expansion during `vim::Scroll` commands (#47024)

Click to expand commit body
Fixes the `vim::ScrollUp/Down` commands when a normal-mode vim or helix
selection exists.

Pretty straightforward: make the `scroll_editor` function aware of the
current vim/helix mode, and only expand the selection if a visual mode
is active.

Closes #47022

Release Notes:

- Fixed bug causing normal-mode vim/helix selections to get expanded
during `vim::Scroll` commands

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>

Josh Robson Chase and dino created

d965856 extension_ci: Increase runners for tests job (#47686)

Click to expand commit body
We were hitting some timeout failures with some runners, hence bumping
the size here.

Release Notes:

- N/A

Finn Evers created

9d5f0f5 tasks: Show error for unknown `ZED_` variables (#45621)

Click to expand commit body
Validate task variable names when the file is saved, immediately
displaying an error toast if any invalid `ZED_*` variables are found.
Valid tasks in the same file are still loaded and work normally.

- Add `task::task_template::TaskTemplate::unknown_variables()` to detect
  invalid `ZED_` variable names
- Add `project::ToastLink` struct and optional `link` field to
  `project::Event::Toast`
- Show documentation link in the error toast

Closes #23275

Release Notes:

- Fixed user-defined tasks with unresolved `ZED_*` variables being
silently omitted

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>

Karl-Erik Enkelmann and dino created

b74b197 collab: Extract tests into integration tests crate (#47668)

Click to expand commit body
Reduces time needed to build collab tests from 48s to 38s.

Release Notes:

- N/A

Piotr Osiewicz created

9326d61 remote_server: Avoid panic when writing to stderr (#47683)

Click to expand commit body
Closes ZED-4JM

Release Notes:

- N/A

Cole Miller created

ee721d3 acp: Dedupe session/list calls (#47677)

Click to expand commit body
Noticed we were calling session/list twice now, this makes sure it only
happens once on load

Release Notes:

- N/A

Ben Brandt created

4007bf9 ci: Notify on more release workflow events (#47565)

Click to expand commit body
This improves the messaging around triggered releases and hopefully
should help with what needs to be done there.

Closes TRA-82.

Release Notes:

- N/A

Finn Evers created

dd8e5a9 StreamingEditFileTool: Disable for now (#47658)

Click to expand commit body
Release Notes:

- N/A

Michael Benfield created

51399d6 Fix remote server exit timeout (#47660)

Click to expand commit body
Was changed by mistake

Release Notes:

- N/A

Co-authored-by: Lukas Wirth <me@lukaswirth.dev>

John Tur and Lukas Wirth created

e49dd8b Fix Zed not entering disconnected state when remote proxy dies (#47659)

Click to expand commit body
When I kill the remote proxy, it seems like `ssh` exits with code -1.
Since that's less than or equal to 0, this means we don't try to restart
the connection. The proxy really shouldn't exit for any reason, so let's
get rid of this check altogether.

Release Notes:

- N/A

Co-authored-by: Lukas Wirth <me@lukaswirth.dev>

John Tur and Lukas Wirth created

ee0e370 extension_cli: Improve snippet error logging (#47653)

Click to expand commit body
Follow-up to #47649

Release Notes:

- N/A

Finn Evers created

987b140 Improve TypeScript keyword syntax highlighting (#47435)

Click to expand commit body
Improve syntax highlighting of keywords by creating groups for
declarations and import/export.

### Release Notes:
- Highlight declarations with `keyword.declaration`:
  - const
  - let
  - var
  - function
  - class
  - enum
  - interface
  - type

- Highlight imports and exports with `keyword.import`:
  - export
  - from
  - import

---------

Co-authored-by: Gaauwe Rombouts <mail@grombouts.nl>

Andrew Currier and Gaauwe Rombouts created

485e9b1 docs: Remove preview indicator for Tailwind CSS Mode (#47651)

Click to expand commit body
Removes the preview indicator from the docs, since this is available in
stable

Release Notes:

- N/A

Gaauwe Rombouts created

86772d5 agent: Cancel subagents (#47647)

Click to expand commit body
Allows cancelling subagents

Release Notes:

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

---------

Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>

Cameron Mcloughlin and Zed Zippy created

3a94910 extension_cli: Validate that all snippets can be parsed (#47649)

Click to expand commit body
With this, we can now ensure that snippet extensions we publish actually
only contain valid snippets.

Release Notes:

- N/A

Finn Evers created

1c113e7 project_panel: Fix alignment of folded directory path components (#47648)

Click to expand commit body
The padding on folded directory path components was causing the first
component to be misaligned with regular entry labels. This adds a
negative margin to the first component to compensate for the left
padding while preserving the hover background.

Before:
<img height="180" alt="before-1"
src="https://github.com/user-attachments/assets/5be234a6-4fca-4940-a979-4cfb767875bb"
/> <img height="180" alt="before-2"
src="https://github.com/user-attachments/assets/1825e12b-eb55-48fe-9b3c-ac52e552581b"
/>

After:
<img height="180" alt="after-1"
src="https://github.com/user-attachments/assets/03b1029d-6664-49bd-9371-680fc912c67c"
/> <img height="180" alt="after-2"
src="https://github.com/user-attachments/assets/fa4954d7-796c-48f3-8f77-6aaee7bfc35c"
/>

Release Notes:

- Fixed alignment of folded directory names in project panel.

Smit Barmase created

0a338c3 Update nim entry with additional file suffixes (#47616)

Click to expand commit body
Expanded the nim entry to include `nims` and `nimble` files

- [nims](https://nim-lang.org/docs/nims.html) is a subscript of Nim that
runs in a VM
- [nimble](https://github.com/nim-lang/nimble) files are project files
for Nim that are written in Nim

Release Notes:

- Updated Nim file aliases so icon is shown for nims/nimble files

Jake Leahy created

71c5e14 Add `ep repair` command to address judge feedback (#47646)

Click to expand commit body
Release Notes:

- N/A

Oleksiy Syvokon created

c31ad94 agent: Encourage more parallel tool use (#47644)

Click to expand commit body
Also standardizes the list format in the prompt

Release Notes:

- N/A

Ben Brandt created