100 Commits
Author SHA1 Message Date
John Tur 49f5fe7750 Fix misaligned borders around avatars with fractional display scale (#63595)
Before and after:


https://github.com/user-attachments/assets/b165d525-c368-4245-a246-2522e67ff3a0

---

Release Notes:

- N/A
2026-09-02 02:14:38 +00:00
John Tur 0b1f4f4020 Delay-load ETW profiling DLLs (#62647)
Since we're here, improve the UX by prompting for a path when you save
rather than when recording begins.

Fixes #62334 

Release Notes:

- N/A
2026-08-28 08:13:20 +00:00
John Tur 2ada348466 Improve Windows shell discovery (#63339)
- Simplify PowerShell discovery, and add support for .NET global tool
installations.
- Fix Git Bash discovery in the case where Zed was launched from within
Git Bash. Git Bash prepends its internal `mingw64\bin` directory to
`PATH`, so `which git` returns a different `bash` executable that causes
the relative path lookup to fail.

Release Notes:

- N/A
2026-08-28 03:21:39 +00:00
John Tur 8a6aaa73ef gpui: Support Windows Restart Manager shutdown (#62987)
Handle the `WM_QUERYENDSESSION` and `WM_ENDSESSION` messages, which are
used by Windows when shutting down an application. For example, Restart
Manager uses this mechanism to gracefully close applications (e.g. when
installing an update to the application).

Release Notes:

- N/A
2026-08-24 02:59:15 +00:00
John Tur ec5ddcf55e Tweak renderer resource management (#62069)
Factoring some changes out of
https://github.com/zed-industries/zed/pull/61461:
- On Metal and wgpu, bulk-upload instance buffers at the start of the
frame rather than uploading chunks as we draw them. The depth buffer
patch needs this architecture since all opaque quads in the scene are
painted before anything else. This also lets us get rid of the awkward
retry loop when the GPU buffer is too small for the scene.
- On Windows, use a constant buffer for the instance offset rather than
creating SRVs with different `FirstElement`s. `FirstElement` is buggy on
some vendors' drivers, and reusing the SRV object should reduce D3D
runtime overhead.
- Misc. refactoring: remove redundant parameters, deduplicate code,
create fewer bind groups on wgpu, etc.

Fixes https://github.com/zed-industries/zed/issues/49588
Fixes https://github.com/zed-industries/zed/issues/59192

Release Notes:

- Fixed an issue where UI elements would flicker on some Windows
devices.
2026-08-03 14:37:21 +00:00
John Tur 4c1f737b8c Fix MCP servers not being populated sometimes in settings UI (#61928)
The MCP server list was always populated from the first workspace in the
`MultiWorkspace`. If Zed is configured to `"restore_on_startup":
"launchpad"`, the first workspace will always be the 'launchpad'
workspace which has no worktees in it. Since there are no worktrees in
this workspace, the MCP store is not populated, so the settings UI did
not show any MCP servers.

---

Release Notes:

- Fixed an issue where the settings UI would sometimes not show the list
of configured MCP servers
2026-07-30 15:24:16 +00:00
John Tur 907dd1f442 gpui_windows: Only flash the window once on request_attention (#61611)
The current behavior bothers me.

Release Notes:

- N/A
2026-07-24 21:44:30 +00:00
John Tur 4feae499a6 Reduce overdraw for border-only quads (#61274)
Restore an optimization that I mistakenly removed in
https://github.com/zed-industries/zed/pull/54728.

Drawing a quad with a border but no fill color will run the quad
fragment shader for every transparent interior pixel, which is
especially costly when the quad is large. Instead, split these quads
into four non-overlapping strips that cover the regions where borders
are painted. The side strips own the straight left and right edges,
while the top and bottom strips own the horizontal edges and the rounded
corners.

Previously, this optimization only applied to borders drawn by the Taffy
layout. I've decided to reinstate the logic directly in `paint_quad` so
that the optimization can be applied more generally... though if this
feels like too much policy, we can move it back.

This reduces the GPU time spent painting a representative Zed scene by
about 20% or so.

Release Notes:

- N/A
2026-07-19 06:52:53 +00:00
John Tur 2e405c7c7a gpui: Remove ExitProcess shutdown workaround (#61219)
The issue with aws-lc that necessitated this workaround has been fixed
upstream: https://github.com/aws/aws-lc/issues/3197.

Release Notes:

- N/A
2026-07-17 19:16:49 +00:00
John Tur dd5f651227 Use more efficient thread pool API on Windows (#60917)
This interface uses fewer syscalls and has less internal synchronization
(since the `TP_WORK` object is not exposed).

Release Notes:

- N/A
2026-07-14 16:40:22 +00:00
John Tur 756116c2b0 Fix "Task polled after completion" panic (#60693)
Dropping a scheduled runnable cancels its task and makes the next poll
of any awaiter panic with "Task polled after completion." The only paths
where we drop these runnables seem to be during shutdown or extreme
resource exhaustion, so, let's leak the runnables instead of crashing.

On Windows, we also moved to calling the Win32 thread pool API directly,
because 1) WinRT thread pool API is just a wrapper that adds overhead we
don't need, and 2) the closure we pass to the `WorkItemHandler` object
takes ownership of the runnable object, so if the WinRT thread pool
releases the delegate, it can free the runnable without our control.

Release Notes:

- N/A
2026-07-09 18:06:00 +00:00
John Tur b381009fd4 Use embedded bitmaps in fonts on Linux (#55202)
Release Notes:

- Added support for using embedded bitmaps in fonts on Linux
2026-04-29 13:23:13 +00:00
John Tur f01d6816cb Support BGR subpixel layout (#55174)
Release Notes:

- Added text rendering support for BGR subpixel layouts.
2026-04-29 12:26:19 +00:00
John TurandZed Zippy dbfdd977c8 Implement luminance-based glyph dilation for macOS (#54886)
Apple's text rendering stack dilates glyph outlines for text rendered
with a light foreground color. Zed doesn't consider this nuance today;
we populate our atlas using glyphs rendered with a dark foreground
color. This means that, particularly in dark themes, text in Zed looks
thin and blurry, and doesn't match the look of native macOS
applications.

This pull request replicates the native behavior of Core Graphics. Some
reverse-engineering revealed that CG computes the foreground color
luminance using the Rec. 709 formula ($Y=0.2126R + 0.7152B + 0.0722G$)
and quantizes it into five levels (0, 0.25, 0.5, 0.75, and 1). Each
level uses a different dilation factor.

With this patch, we calculate this same luminance bucket and supply it
as the foreground color during rasterization. The correct dilation will
be applied, and we'll store this glyph in the atlas keyed by this
luminance bucket. So, we'll generate and use up to 5 different bitmaps
for each glyph based on its foreground color.

I've confirmed that text rendered by Zed now exactly matches native
applications like Safari, TextEdit, etc.

Release Notes:

- Improved text rendering clarity on macOS, particularly in dark themes.

---------

Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-04-29 07:09:11 +00:00
John Tur 55adf85aa7 Fix process teardown deadlock on Windows (#55065)
AWS-LC registers an `atexit` handler that intentionally acquires a lock
without releasing it. AWS-LC also has `thread_local` objects which
acquire this lock in their destructor. Destructors for `thread_local`s
run under the loader lock. So, there is a race condition where, if a
thread exits after `atexit` handlers have run, the TLS destructors will
block indefinitely on this lock while holding the loader lock. Since
`ExitProcess` also requires the loader lock, process teardown will
deadlock.


Closes #54856

Release Notes:

- Fixed an issue where the Zed process wouldn't exit after closing all
windows
2026-04-28 08:19:03 +00:00
John Tur 3b39487e90 Pixel snapping (#54728)
Painting primitives at non-integer pixel coordinates produces blurry
output. Pixel snapping converts layout coordinates into integer
device-pixel coordinates so painted edges land exactly on physical pixel
boundaries.

Non-integer coordinates can arise for several reasons, including:

- flex distribution, percentages, centering, and text measurement can
produce fractional element sizes and positions;
- at fractional scale factors (for example 125% or 150%), integer
logical-pixel values can map to non-integer device-pixel values.

We pixel-snap by rounding in device-pixel space, after multiplying by
`scale_factor`, so that snapping targets physical pixels. Bounds are
divided by `scale_factor` before being returned to GPUI.

Midpoints are rounded toward zero. This is a stylistic choice: a
1-logical-pixel line at 150% scale should render as 1 dp rather than 2
dp.

Pixel snapping is done in two phases:

1. Pre-layout metric snapping. Before Taffy computes layout, all
authored absolute lengths are rounded in `to_taffy`. This includes
borders, padding, gaps, and explicit sizes. Custom-measured leaf nodes
have their measured sizes rounded up to integer device-pixel lengths.
2. Post-layout edge snapping. After Taffy resolves the tree, layout
relationships such as flex shares, grid tracks, percentages, and
centering can produce new fractional edge positions. Boxes now have
edges in absolute coordinates, and snapping must decide where those
edges land on the device-pixel grid.

Ideally, post-layout snapping would satisfy:

- Edge closure. Two raw layout edges at the same absolute position
should snap to the same pixel column.
- Translation stability. A component's internal geometry should not
change when it moves to a new absolute position.

These goals are in tension because rounding is not associative. The
simple local schemes make different tradeoffs:

- Absolute edge rounding gives each window coordinate one answer, so
coincident edges always close globally. But a span's snapped length is
`round(far) - round(near)`, which may change by 1 dp as its absolute
origin moves.
- Parent-relative edge rounding rounds each child inside its parent's
coordinate space. This guarantees translation stability, but a shared
edge reached through different parents can accumulate different
rounding, causing non-closure between cousins.
- Length rounding rounds each width, height, and thickness independently
and then places boxes from those rounded lengths. Sizes stay stable
under translation, but neighboring boxes derive their shared boundary
from different sources, so closure is not guaranteed.

We apply absolute edge rounding for each element's outer box in
post-layout rounding to preserve closure. Border and padding widths are
not touched by post-layout rounding; they keep their pre-layout rounded
value so that they remain stable under translation.

This gives both closure and translation stability in the case that all
local metrics are integer device-pixel lengths. Pre-layout rounding
covers that in most cases. The exception is metrics resolved by layout
relationships, such as percentages. Outer box edges will still close
globally, and painted border widths are still snapped independently, but
the raw content-box origin can carry a 1 dp residual into descendants.

---

Fixes https://github.com/zed-industries/zed/issues/46360
Fixes https://github.com/zed-industries/zed/issues/44528
Fixes https://github.com/zed-industries/zed/issues/40282
Fixes https://github.com/zed-industries/zed/issues/42257

---


Release Notes:

- Fixed potentially blurry appearance of UI elements when using
fractional display scaling.
2026-04-24 08:31:43 +00:00
John Tur a602db1c5b Pass shift-home and shift-end keystrokes to the terminal (#54706)
It's not clear what this logic was supposed to do, and it was preventing
shift+{special key} combinations from being sent to the terminal.

Fixes #52985

Release Notes:

- N/A
2026-04-24 06:41:37 +00:00
John Tur fd6848dbf1 Enable segment heap for Zed (#54538)
Reduces memory usage on Windows by using a newer heap implementation.

Memory usage after opening into the Welcome screen:
- Before: 124 MB
- After: 91 MB

Release Notes:

- N/A
2026-04-22 16:58:55 -04:00
John Tur 18a1c1c36a Fix broken is_maximized check on Windows (#54436)
Bad change from https://github.com/zed-industries/zed/pull/54321

Fixes https://github.com/zed-industries/zed/issues/54418

Release Notes:

- N/A
2026-04-21 13:35:13 -04:00
John Tur 59467e05f0 Remove settings dependency from anthropic (#51979)
Release Notes:

- N/A
-
2026-03-19 19:48:30 -04:00
John Tur 63479d19aa Update to wgpu v29 (#51889)
This release includes the OpenGL fixes which were sent upstream.

Release Notes:

- N/A
2026-03-19 07:57:57 +01:00
John Tur 471bf7ca7e Improve clipboard support on Windows (#51807)
- Simplify and improve Windows clipboard handler.
- Fixed components that weren't handling multiple formats on the
clipboard properly.

Closes https://github.com/zed-industries/zed/issues/51278

Release Notes:

- windows: Fixed an issue where text copied from Office applications
couldn't be pasted into Zed.
2026-03-18 22:09:26 -04:00
John Tur 938c8870e4 Enable extended reasoning for Anthropic models in Copilot (#46540)
Fixes https://github.com/zed-industries/zed/issues/45668

https://github.com/microsoft/vscode-copilot-chat used as a reference for
headers and properties we need to set

| Before | After | 
| --- | --- |
| <img width="300"
src="https://github.com/user-attachments/assets/d112a9ef-52d2-42ff-a77b-4b4b15f950fe"
/>| <img width="300"
src="https://github.com/user-attachments/assets/0f1d7ae0-bee1-46f7-92ef-aea0fa6cde7a"
/> |

Release Notes:

- Enabled thinking mode when using Anthropic models with Copilot
2026-03-08 09:34:46 +00:00
John Tur 850943f89e Disable the IME on Windows when text input is unexpected (#51041)
Fixes #42444

- Changed `accepts_text_input` on the editor to be more precise.
Previously, it returned `true` only in insert mode. Now it also returns
`true` when an operator is pending.
- On Windows, we disable the IME whenever there is no input handler
which `accepts_text_input`.
- How this improves Vim mode: in insert mode, the IME is enabled; in
normal mode, it is disabled (command keys are not intercepted); when an
operator is pending, the IME is re-enabled.

Release Notes:

- On Windows, the IME is disabled in Vim normal and visual modes.
2026-03-08 04:54:05 +00:00
John Tur b89152e516 Lazily initialize kernelspecs (#51026)
On Windows, the WSL VM always boots up when Zed is opened, because we
eagerly discover which jupyter kernels are installed inside WSL on
startup. This is not desirable if the REPL feature is not being used.
Defer this work to the point where we actually need to know what kernels
are installed.

Release Notes:

- N/A
2026-03-07 20:51:22 -05:00
John Tur e9c497c4b1 Fix OpenGL initialization on Intel HD 4000 (#50983)
Almost there!

Release Notes:

- N/A
2026-03-07 03:22:49 +00:00
John Tur 34c931e01e Fix OpenGL initialization on Intel HD 4000 (#50891)
I think we might just get it working this time

Release Notes:

- N/A
2026-03-06 02:06:27 +00:00
John Tur c9f59123fb Fix crash in start_display_link (#50875)
Fixes ZED-5G8

If `DisplayLink::new` fails, `frame_requests` is dropped . It is not
valid to destroy a DispatchSource that is not `resume()`d. So, ensure we
call `resume()` before there's a chance for anything to fail.

Release Notes:

- Fixed a crash that could occur on macOS when changing monitor
configurations
2026-03-05 21:54:20 +00:00
John Tur 6331127ccd Fix OpenGL initialization on Intel HD 4000 (#50772)
For real this time?

Release Notes:

- N/A
2026-03-05 02:35:29 +00:00
John Tur 8953f09948 More fixes for OpenGL initialization on Intel HD 4000 (#50680)
Release Notes:

- N/A
2026-03-04 08:55:53 +00:00
John Tur d36b5e7854 Fix OpenGL initialization on Intel HD 4000 (#50646)
Release Notes:

- Fixed Zed failing to initialize OpenGL on certain Linux devices
2026-03-03 22:31:53 +00:00
John TurandConrad Irwin 844028e341 Fix handling of surface.configure on Linux (#50640)
Closes #50574

Release Notes:

- Fixed Zed not being responsive on some Linux configurations

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2026-03-03 21:47:57 +00:00
John Tur 69ee10c33d Improve documentation for ETW profiling (#50426)
Release Notes:

- N/A
2026-02-28 23:03:49 -05:00
John Tur 5060f0481c Use dispatch2 crate (#50171)
Release Notes:

- N/A
2026-02-28 02:54:15 +00:00
John TurandConrad Irwin b56758c4c9 Dynamically detect surface size limits on WGPU (#50340)
Fallout from https://github.com/zed-industries/zed/pull/50270

Release Notes:

- N/A

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2026-02-27 20:46:18 +00:00
John Tur 5954074aee Improve GPU selection on Linux (#50274)
Follow-up to https://github.com/zed-industries/zed/pull/50270

Release Notes:

- N/A
2026-02-27 07:59:06 +00:00
John Tur 06960d4ff8 Relax device limits for WGPU (#50270)
Plus some minor cleanup.

Release Notes:

- Fixed GPU acceleration not working on certain Linux devices.
2026-02-27 01:31:20 -05:00
John Tur be65c8c7d4 Fix Windows remote server (#50152)
More fallout from https://github.com/zed-industries/zed/pull/49277.

Closes #50149.

Release Notes:

- Fixed remote server failing to launch on Windows.
2026-02-26 03:00:15 +00:00
John Tur ea3eed1753 Narrow .occlude() call (#49981)
Release Notes:

- N/A
2026-02-24 13:56:43 +00:00
John Tur 8ae99556ab Revert "Optimize workspace/didChangeWatchedFiles handler" (#49826)
Reverts zed-industries/zed#49778

This seems to have made things much worse in some cases, so I'll have to
think of a different way to fix the original issue.

Release Notes:
- N/A
2026-02-21 23:54:57 -05:00
John Tur f78d32f3ed Update C# docs (#49789)
Release Notes:

- N/A
2026-02-21 06:58:52 +00:00
John Tur f3a3a0df04 Improve ETW profiler action (#49788)
- Don't enable heap tracing by default since it has a large performance
impact. A separate action that records with heap tracing is available.
- Use in-memory recording rather than file recording, since the latter
seems to cause a lot of dropped stack walks.
- Don't record stack walk data for GPU events to help reduce the trace
size.

Release Notes:

- N/A
2026-02-21 06:11:45 +00:00
John Tur 22227c05b3 Fix certain title bar elements not being interactive on Windows (#49781)
https://github.com/zed-industries/zed/pull/48330 caused the title bar to
start eating input events below these controls. We should find a way to
make the title bar handling less busted, but this will do for now.

Before you mark this PR as ready for review, make sure that you have:
- [X] Added a solid test coverage and/or screenshots from doing manual
testing
- [X] Done a self-review taking into account security and performance
aspects

Release Notes:

- N/A
2026-02-21 04:49:37 +00:00
John Tur 351ec9cb4f Optimize workspace/didChangeWatchedFiles handler (#49778)
Previously, `didChangeWatchedFiles` registrations triggered a rebuild of
a single `GlobSet` containing all file watch patterns for the language
server. This means that, each time `didChangeWatchedFiles` is
registered, the work it takes to construct the `GlobSet` increases. This
quadratic blowup caused massive lag with language servers which register
thousands of watched files (like Roslyn).

Instead, create one `GlobSet` per registration and try matching them
one-by-one each time a file watcher event is raised.

---

Before you mark this PR as ready for review, make sure that you have:
- [X] Added a solid test coverage and/or screenshots from doing manual
testing
- [X] Done a self-review taking into account security and performance
aspects

Release Notes:

- Optimized performance for language servers which register many
file-watching notifications.
2026-02-21 04:29:42 +00:00
John Tur b438c65f1f Add ETW profile recorder action (#49712)
https://github.com/user-attachments/assets/8b0be641-625e-410f-b7c1-abe549504c11

Before you mark this PR as ready for review, make sure that you have:
- [X] Added a solid test coverage and/or screenshots from doing manual
testing
- [X] Done a self-review taking into account security and performance
aspects
- [X] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- Added a `zed: record etw profile` action that can be used to collect
performance profiles on Windows.
2026-02-20 13:36:04 +00:00
John TurandMarshall Bowers 76d8d97998 Fix Windows build (#49665)
Fix regressions from https://github.com/zed-industries/zed/pull/49277:

- The fusion manifest was not being embedded for Zed.exe, making it
non-functional.
- The relative path used to load shaders in debug mode was incorrect.

Release Notes:

- N/A

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2026-02-19 19:15:59 -05:00
John Tur 2409a790ba Support profiling remote server in the miniprofiler (#49582)
Release Notes:

- The `zed: open performance profiler` action can now display profiling
data from the remote server.
2026-02-19 10:52:53 +00:00
John Tur 4edfa67b24 Reuse existing remote workspaces when opening files from the CLI (#49307)
Re-lands https://github.com/zed-industries/zed/pull/48891, which was
reverted due to conflicts with multi-workspace.

Before you mark this PR as ready for review, make sure that you have:
- [X] Added a solid test coverage and/or screenshots from doing manual
testing
- [X] Done a self-review taking into account security and performance
aspects

Release Notes:

- N/A
2026-02-16 18:03:18 -05:00
John Tur bf76c87825 Simplify calculation of Windows client area size (#49249)
Delete all the hacks and do things properly instead.

Closes https://github.com/zed-industries/zed/issues/45574

Before you mark this PR as ready for review, make sure that you have:
- [X] Added a solid test coverage and/or screenshots from doing manual
testing
- [X] Done a self-review taking into account security and performance
aspects

Release Notes:

- N/A
2026-02-16 03:40:38 -05:00
John TurandEric Holk 408c4e4e60 Potentially fix hang when opening LSP menu (#49046)
It is maybe possible that, if a process's parent dies, the PID can be
reused by a different process. This could cause an infinite loop in
`is_descendant_of`. To fix this, break out of the loop when a cycle is
detected.

- [ ] Tests or screenshots needed?
- [X] Code Reviewed
- [X] Manual QA

Release Notes:

- N/A

---------

Co-authored-by: Eric Holk <eric@zed.dev>
2026-02-12 17:55:36 +00:00
John Tur ba1253c210 Fix path handling regressions on Windows (#48905)
https://github.com/zed-industries/zed/pull/48891 changed `find_worktree`
to use `PathStyle::strip_prefix`, which exposed this bug.

- [ ] Tests or screenshots needed?
- [X] Code Reviewed
- [X] Manual QA

Release Notes:

- N/A
2026-02-11 03:23:13 +00:00
John Tur ca431e7500 Reuse existing windows when opening files in remote workspaces (#48891)
Closes https://github.com/zed-industries/zed/issues/42366

- [ ] Tests or screenshots needed?
- [X] Code Reviewed
- [X] Manual QA

Release Notes:

- Opening files with the Zed CLI will reuse existing windows for remote
workspaces.
2026-02-10 17:48:54 -05:00
John Tur 884d5082bd Only raise Windows timer resolution while blocking with timeout (#48379)
Power usage

Release Notes:

- N/A
2026-02-06 21:29:20 -05:00
John Tur 5fa931a5f8 Optimize resource upload in D3D11 (#48282)
Currently, each time we draw a primitive batch, we fully overwrite the
instance buffer with the contents of the new batch. Since we use a
write-only mapping to do this, the GPU driver may handle synchronization
hazards by transparently creating new allocations if the previous
allocation is still in use. We draw many primitive batches in one frame,
which stress-tests this mechanism somewhat. If internal driver limits
are hit, the resource update will start to block until the GPU catches
up and releases in-use allocations. This would result in a significant
reduction in framerate.

To avoid this, we upload the data for all primitive batches at once at
the beginning of the frame. Each primitive batch draw then binds the
relevant sub-array of the instance buffer. This way, there are no
mid-frame resource updates.

Release Notes:

- N/A
2026-02-03 17:15:44 -05:00
John Tur d0f53a8cde Show memory used by language servers (#48226)
Closes https://github.com/zed-industries/zed/issues/32712

<img width="575" height="131" alt="image"
src="https://github.com/user-attachments/assets/aaad583c-277c-4a84-b2ce-a18b8b38bc0e"
/>

Release Notes:

- The language servers menu now shows the memory used by each language
server.
2026-02-02 18:45:28 -05:00
John Tur 293db2466d Fix issues with Windows SSH support (#47822)
- Remove the newlines in the unzip command string, which made it not
work.
- Fix spawning the terminal and tasks. Unfortunately, the Windows
OpenSSH server has limitations that require rather ugly workarounds.

Release Notes:

- N/A
2026-01-28 02:37:26 +00:00
John Tur b51c25e00f Fix extraction of Windows remote server (#47690)
Release Notes:

- N/A
2026-01-26 20:51:13 +00:00
John TurandLukas Wirth 767c074bc8 Fix remote server exit timeout (#47660)
Was changed by mistake

Release Notes:

- N/A

Co-authored-by: Lukas Wirth <me@lukaswirth.dev>
2026-01-26 15:30:12 +00:00
John TurandLukas Wirth c5c396ef2d Fix Zed not entering disconnected state when remote proxy dies (#47659)
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>
2026-01-26 15:23:35 +00:00
John TurandLukas Wirth a0d20995c5 Add SSH remote server for Windows (#47460)
Closes https://github.com/zed-industries/zed/issues/33748

Release Notes:

- Windows is now supported as a target platform for SSH remoting.

---------

Co-authored-by: Lukas Wirth <me@lukaswirth.dev>
2026-01-24 13:15:01 -05:00
John Tur 0ccc4c9a32 Fix emoji on Linux when using High DPI (#46857)
Fixes https://github.com/zed-industries/zed/issues/46849

Release Notes:

- Fixed emoji being too small on Linux when using High DPI
2026-01-15 02:40:13 +00:00
8bd622a392 Allow running MCP servers on the remote server when using remote development (#46756)
Closes https://github.com/zed-industries/zed/issues/34402

Release Notes:

- MCP servers can now be run on the remote server when using remote
development. This can be enabled by setting the `"remote": true`
property in the settings entry for the MCP server.

---------

Co-authored-by: localcc <kate@zed.dev>
Co-authored-by: Lukas Wirth <me@lukaswirth.dev>
2026-01-14 14:41:22 -05:00
John Tur 6884f539f4 Fix Windows IME composition string being displayed incorrectly (#46545)
Previously, a new composition string was processed before a new
composition result. Thus, in the case that a keystroke creates a new
composition result and composition string, the processing of the new
result would overwrite the new string, even though they should both be
displayed. Processing them in the reverse order fixes this issue.
 
Fixes #42201

Additionally: while fixing this issue, I discovered that the Japanese
IME sometimes moves the cursor far away from the inserted text. WPF
works around this issue by only respecting the IME's requested cursor
position if it's adjacent to uncommitted text. So, we copy this
workaround.

Release Notes:

- N/A
2026-01-11 05:10:51 +00:00
John Tur 1b74b6e71b Use transparent clear color for opaque windows on Linux (#46281)
https://github.com/zed-industries/zed/pull/45423 changed the Blade
renderer to use a white clear color for "opaque" windows. This interacts
poorly with our client-side decorations, causing the shadows around the
window to be drawn over a white background.

Release Notes:

- N/A
2026-01-07 19:39:57 +00:00
John Tur f974a9d540 Fix stale pull diagnostics for open buffers (#46201)
Release Notes:

- N/A
2026-01-06 23:57:25 +00:00
John TurandMax Brunsfeld 9010a6f18a Add support for subpixel text rendering (#45423)
Subpixel text rendering is now implemented on Windows and Linux.

Comparison screenshots:

|Before|After|
| ------------- | ------------- |
| <img width="400"
src="https://github.com/user-attachments/assets/9d720d2c-2ec4-4adf-a83f-7c2d81d30025"
/> | <img width="400"
src="https://github.com/user-attachments/assets/8fd7dc2a-8ca0-4f71-86cd-55460f568f7a"
/> |


Release Notes:

- Added support for subpixel (ClearType-style) text rendering. This
improves the legibility of text on standard DPI displays. Subpixel
rendering is enabled by default on Windows and Linux and can be
configured using the `text_rendering_mode` setting.

---------

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2026-01-06 03:46:31 -05:00
John Tur 3585f9d3fc Delete pulled diagnostics when the source registration is unregistered (#46105)
Additionally, fix a race condition where we'd still insert diagnostics
from a document or workspace pull even if the registration had been
unregistered in the time since the request was issued.

And, as a bonus: when a new pull diagnostics registration is added,
issue document pulls immediately.

This should fix regressions with basedpyright caused by
https://github.com/zed-industries/zed/pull/43703.

Release Notes:

- N/A
2026-01-05 16:15:08 -05:00
John Tur 50f66985a4 Update cc and cmake crates (#44797)
This fixes the build when Visual Studio 2026 is installed.

Release Notes:

- N/A
2025-12-14 07:45:54 +00:00
John TurandLukas Wirth ebe71e6d32 Use shell to launch MCP and ACP servers (#42382)
`npx`, and any `npm install`-ed programs, exist as batch
scripts/PowerShell scripts on the PATH. We have to use a shell to launch
these programs.

Fixes https://github.com/zed-industries/zed/issues/41435
Closes https://github.com/zed-industries/zed/pull/42651


Release Notes:

- windows: Custom MCP and ACP servers installed through `npm` now launch
correctly.

---------

Co-authored-by: Lukas Wirth <me@lukaswirth.dev>
2025-12-10 12:08:37 -05:00
John Tur 6383a2df5a Fix unregistration logic for pull diagnostics (#44294)
Even if `workspace_diagnostics_refresh_tasks` is empty, registrations
which didn't advertise support for workspace diagnostics may still
exist.

Release Notes:

- N/A
2025-12-06 11:31:05 -05:00
John Tur e29ba60405 Reduce priority of Windows thread pool work items (#44121)
`WorkItemPriority::High` will enqueue the work items to threads with
higher-than-normal priority. If the work items are very intensive, this
can cause the system to become unresponsive. It's not clear what this
gets us, so let's avoid the responsiveness issue by deleting this.

Release Notes:

- N/A
2025-12-04 07:45:36 +00:00
946ca35fe8 Improve support for multiple registrations of textDocument/diagnostic (#43703)
Closes https://github.com/zed-industries/zed/issues/41935

The registration ID responsible for generating each diagnostic is now
tracked. This allows us to replace only the diagnostics from the same
registration ID when a pull diagnostics report is applied.

Additionally, various deficiencies in our support for pull diagnostics
have been fixed:
- Document pulls are issued for all open buffers, not just the edited
one. A shorter debounce is used for the edited buffer. Workspace
diagnostics are also now ignored for open buffers.
- Tracking of `lastResultId` is improved.
- Stored pull diagnostics are discarded when the corresponding buffer is
closed.

Release Notes:

- Improved compatibility with language servers that use the "pull
diagnostics" feature of Language Server Protocol.

---------

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
2025-12-03 20:47:43 +02:00
John Tur 096eabc0ae Fix "busy" cursor appearing on startup (#44019)
Closes https://github.com/zed-industries/zed/issues/43910

Release Notes:

- N/A
2025-12-02 16:15:18 -05:00
John Tur 991e98ee76 Don't halt processing from WM_SETCURSOR (#43982)
Release Notes:

- N/A
2025-12-02 05:57:20 -05:00
John Tur 8d123eecf3 Respect vertical placement offset for glyphs (#43812)
Before:
<img width="41" height="45" alt="image"
src="https://github.com/user-attachments/assets/0f8b1d0e-b0cf-483c-aa2d-77aadd90503c"
/>

After:
<img width="34" height="50" alt="image"
src="https://github.com/user-attachments/assets/fa3eb842-2d1b-49b1-9c37-ebe6e11b37eb"
/>



Release Notes:

- N/A
2025-11-29 17:04:04 -05:00
John Tur 98cbfa3ff6 Upgrade python-environment-tools (#43496)
Fixes https://github.com/zed-industries/zed/issues/42554
Fixes https://github.com/zed-industries/zed/issues/43383

Release Notes:

- python: Added support for detecting uv workspaces as toolchains.
- windows: Fixed console windows sometimes appearing when opening Python
files.
2025-11-25 18:05:59 -05:00
John Tur 781303e611 Fix labels for GitHub issue templates (#43348)
Release Notes:

- N/A
2025-11-23 03:21:43 -05:00
John Tur 5720b42d7b Fix Windows bundling (#43083)
The updated package from
https://github.com/zed-industries/zed/pull/43066 changed the paths of
these files in the nupkg.

Release Notes:

- N/A
2025-11-19 12:25:03 -05:00
John Tur c7b1394e34 Add QuitMode policy to GPUI (#42391)
Applications can select a policy for when the app quits using the new
function `Application::with_quit_mode`:
- Only on explicit calls to `App::quit`
- When the last window is closed
- Platform default (former on macOS, latter everywhere else) 

Release Notes:

- N/A
2025-11-10 16:45:43 -05:00
John Tur c256bb0cae Ignore "Option as Meta" setting outside of macOS (#42367)
The "Option" key only exists on a Mac. On other operating systems, it is
always expected that the Alt key generates escaped characters.

Fixes https://github.com/zed-industries/zed/issues/40583

Release Notes:

- N/A
2025-11-10 15:11:18 -05:00
John Tur c9605b5ff8 Additional Windows keyboard input fixes (#42294)
- Enable Alt+Numpad input
- For this to be effective, the default keybindings for Alt+{Number}
will need to be unbound. This won't be needed once we gain the ability
to differentiate numpad digit keys from alphanumeric digit keys.
  - Fixes https://github.com/zed-industries/zed/issues/40699
- Fix a number of edge cases with dead keys

Release Notes:

- N/A
2025-11-09 03:51:39 -05:00
John Tur 2090e25d27 Fix crash during drag-and-drop on Windows (#42227)
The HGLOBAL is itself the HDROP. Do not dereference it.

Release Notes:

- windows: Fixed crashes during drag-and-drop operations
2025-11-07 19:18:47 +00:00
John Tur 1a17863f8b Update Windows docs (#41423)
- Document Arm64 support
- Document minimum Windows version requirements

Release Notes:

- N/A
2025-11-05 21:23:48 +00:00
John Tur ce2fb11dcd Fix corrupted characters being inserted when Alt is pressed (#42033)
The Alt+Numpad buffer that's maintained by the input stack is getting
corrupted, leading to garbage characters being inserted on keystrokes
like Alt+Up. Disable the automatic handling of Alt+Numpad for now until
the cause of this corruption is understood. The Alt+Numpad input did not
work anyway, so this does not regress anything.

Release Notes:

- windows: Fixed corrupted characters being inserted when Alt is pressed
(preview only)
2025-11-05 21:03:36 +00:00
John Tur 5b3fd2f2fe Work around codegen bug with GetKeyboardState (#41970)
Works around an issue, which can be reproduced in the following program:
```rs
use windows::Win32::UI::Input::KeyboardAndMouse::{GetKeyboardState, VK_CONTROL};

fn main() {
    let mut keyboard_state = [0u8; 256];
    unsafe {
        GetKeyboardState(&mut keyboard_state).unwrap();
    }

    let ctrl_down = (keyboard_state[VK_CONTROL.0 as usize] & 0x80) != 0;
    println!("Is Ctrl down: {ctrl_down}");
}
```

In debug mode, this program prints the correct answer. In release mode,
it always prints false. The optimizer appears to think that
`keyboard_state` isn't mutated and remains zeroed, and folds the
`modifier_down` comparisons to `false`.

Release Notes:

- N/A
2025-11-05 08:06:14 +00:00
John Tur c6ef0a589f Improve Windows text input for international keyboard layouts and IMEs (#41259)
- Custom handling of dead keys has been removed. UX for dead keys is now
the same as other applications on Windows.
- We could bring back some kind of custom UI, but only if UX is fully
compatible with expected Windows behavior (e.g. ability to move the
cursor after typing a dead key).
  - Fixes https://github.com/zed-industries/zed/issues/38838
- Character input via AltGr shift state now always has priority over
keybindings. This applies regardless of whether the keystroke used the
AltGr key or Ctrl+Alt to enter the shift state.
- In particular, we use the following heuristic to determine whether a
keystroke should trigger character input first or trigger keybindings
first:
- If the keystroke does not have any of Ctrl/Alt/Win down, trigger
keybindings first.
- Otherwise, determine the character that would be entered by the
keystroke. If it is a control character, or no character at all, trigger
keybindings first.
- Otherwise, the keystroke has _any_ of Ctrl/Alt/Win down and generates
a printable character. Compare this character against the character that
would be generated if the keystroke had _none_ of Ctrl/Alt/Win down:
- If the character is the same, the modifiers are not significant;
trigger keybindings first.
- If there is no active input handler, or the active input handler
indicates that it isn't accepting text input (e.g. when an operator is
pending in Vim mode), character entry is not useful; trigger keybindings
first.
- Otherwise, assume the modifiers enable access to an otherwise
difficult-to-enter key; trigger character entry first.
  - Fixes https://github.com/zed-industries/zed/issues/35862
- Fixes
https://github.com/zed-industries/zed/issues/40054#issuecomment-3447833349
  - Fixes https://github.com/zed-industries/zed/issues/41486
- TranslateMessage calls are no longer skipped for unhandled keystrokes.
This fixes language input keys on Japanese and Korean keyboards (and
surely other cases as well).
- To avoid any other missing-TranslateMessage headaches in the future,
the message loop has been rewritten in a "traditional" Win32 style,
where accelerators are handled in the message loop and TranslateMessage
is called in the intended manner.
  - Fixes https://github.com/zed-industries/zed/issues/39971
  - Fixes https://github.com/zed-industries/zed/issues/40300
  - Fixes https://github.com/zed-industries/zed/issues/40321
  - Fixes https://github.com/zed-industries/zed/issues/40335
  - Fixes https://github.com/zed-industries/zed/issues/40592
  - Fixes https://github.com/zed-industries/zed/issues/40638
- As a bonus, Alt+Space now opens the system menu, since it is triggered
by the WM_SYSCHAR generated by TranslateMessage.
- VK_PROCESSKEYs are now ignored rather than being unwrapped and matched
against keybindings. This ensures that IMEs will reliably receieve
keystrokes that they express interest in. This matches the behavior of
native Windows applications.
  - Fixes https://github.com/zed-industries/zed/issues/36736
  - Fixes https://github.com/zed-industries/zed/issues/39608
  - Fixes https://github.com/zed-industries/zed/issues/39991
  - Fixes https://github.com/zed-industries/zed/issues/41223
  - Fixes https://github.com/zed-industries/zed/issues/41656
  - Fixes https://github.com/zed-industries/zed/issues/34180
  - Fixes https://github.com/zed-industries/zed/issues/41766


Release Notes:

- windows: Improved keyboard input handling for international keyboard
layouts and IMEs
2025-11-04 20:28:12 -05:00
John Tur 9aa5bf5c13 Coalesce dispatcher window messages on Windows (#41861)
Take 2 at https://github.com/zed-industries/zed/pull/41595

Release Notes:

- N/A
2025-11-04 09:43:06 +01:00
John Tur 8b51c9dd46 Adjust Windows fusion manifests (#41408)
- Declare UAC support. This will prevent Windows from flagging
`auto_update_helper.exe` as a legacy setup program that needs to run as
administrator.
- Declare support for Windows 10. This will stop Windows from applying
various application compatibility profiles.

The UAC policy is not really appropriate to apply to all GPUI
applications (e.g. an installer written in GPUI may want to declare
itself as `requireAdministrator` instead of `asInvoker`). I tried
splitting this into a Zed.exe-only manifest and enabling manifest file
merging, but I ran out of my time-box. We can fix this later if this is
flagged by GPUI users.

Release Notes:

- N/A
2025-10-28 20:21:31 -04:00
John Tur aafdc33b98 Always delete OpenConsole.exe on Windows uninstall (#41348)
By default, the uninstaller will only delete files that were written by
the original installer. When users upgrade Zed, these new
OpenConsole.exe files will have been written by auto_upgrade_helper, not
the installer. Force them to be deleted on uninstall, so they do not
hang around.

Release Notes:

- N/A
2025-10-28 07:14:56 +00:00
John Tur 46139b456c Fix Windows updater failing to copy OpenConsole.exe (#41338)
Release Notes:

- N/A
2025-10-28 05:10:57 +00:00
John TurandJulia Ryan a44cf3acd2 Reland Windows Arm64 builds in CI (#40855)
Release Notes:

- windows: Added builds for Arm64 architecture

---------

Co-authored-by: Julia Ryan <juliaryan3.14@gmail.com>
2025-10-27 23:59:34 -04:00
John Tur 09d28ec0dd Add attribution for code sourced from Windows Terminal (#41061)
Release Notes:

- N/A
2025-10-24 00:12:06 +00:00
66c83f9572 Fix code signing for Windows installer (#40847)
Release Notes:

- N/A

Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-10-21 20:21:43 -06:00
John Tur d4868143ac Fix nightly upload on Windows (#40843)
Release Notes:

- N/A
2025-10-22 01:55:02 +00:00
John TurandJulia Ryan daadb8ba8a Add Windows Arm64 builds to CI (#40821)
Closes https://github.com/zed-industries/zed/issues/40378

Release Notes:

- N/A

---------

Co-authored-by: Julia Ryan <juliaryan3.14@gmail.com>
2025-10-21 14:51:54 -07:00
John Tur d9456cb908 Don't probe for local workspaces pointing to WSL filesystem on startup (#40142)
We automatically delete a local workspace if the folders comprising it
no longer exist.
If a local workspace points to folders in the WSL filesystem, checking
whether those folders exist will make us wait for the WSL VM and file
server to boot up. This can block Zed startup for many seconds.

Supported scenarios use remote workspaces, so delete these local
workspaces to ensure that we don't try to access their folders on the
startup path.

Release Notes:

- N/A
2025-10-14 14:24:03 -04:00
John Tur 7d82ad4ca2 Use DwmFlush unconditionally for Windows vsync (#39913)
Closes #36934

I'm still experiencing bugs with the
`DCompositionWaitForCompositorClock` API. Let's back out the support for
now until the fixes are identified and widely available.

`DwmFlush` does various things that aren't just waiting for VSync, so
it's not ideal, but it's not bad enough that it's worth a bigger
refactor right now.

Release Notes:

- N/A
2025-10-13 12:40:00 -04:00
John Tur 4f0d055bea Improve importing font-family settings from VS Code (#39736)
Closes https://github.com/zed-industries/zed/issues/39259

- Fixes import of `editor.fontFamily` (we were looking for the wrong
key)
- Adds basic support for the CSS font-family syntax used by VS Code,
including font fallback

Release Notes:

- N/A
2025-10-08 19:19:48 -04:00
John Tur c569808a97 Fix Ctrl+C not working when Zed is launched from CLI (#39482)
Closes https://github.com/zed-industries/zed/issues/38383
Closes https://github.com/zed-industries/zed/issues/39330

Release Notes:

- N/A
2025-10-06 20:35:44 +00:00
John TurandJulia Ryan 08be7a8e14 Fix caption buttons going off-screen (#39502)
https://github.com/user-attachments/assets/27bf58df-b8c4-4730-856b-d62ec639a552

Previously the caption buttons (minimize, maximize, close) would
disappear off the right side of the title bar.

Release Notes:

- N/A

Co-authored-by: Julia Ryan <juliaryan3.14@gmail.com>
2025-10-03 23:25:54 +00:00