Commit graph

1313 commits

Author SHA1 Message Date
Mikhail Pertsev
85f8bf7393
editor: Extract header and mouse out of element.rs (#57472)
cc @SomeoneToIgnore

## Summary

Follow-up to [this
comment](https://github.com/zed-industries/zed/discussions/55352#discussioncomment-16961889).
This extracts the buffer header and breadcrumb rendering helpers out of
`element.rs` into a `header.rs` and mouse related things to `mouse.rs`

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A
2026-05-29 11:51:17 +00:00
Oleksiy Syvokon
d33a3186aa
Respect max line limit for invisible character replacements (#57137)
This change makes sure that `LineWithInvisibles::from_chunks` applies
the max line length limit to invisible character replacements as it does
to normal text chunks.

Without this change, pathological lines containing many invisible
characters could produce unbounded number of line fragments.

Closes FR-6.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable


Release Notes:

- Fixed a rare panic that could occur when lines in the editor contained
many invisible characters.
2026-05-20 12:41:02 +00:00
Neel
7a37888f7b
editor: Add action to toggle all diff hunks (#56421)
Release Notes:

- Added action to toggle all diff hunks
2026-05-18 18:02:51 +00:00
Xiaobo Liu
bfe914beec
editor: Remove redundant allocation when merging highlight ranges (#57034)
Reduce one Vec clone + collect allocation per frame

Release Notes:

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

---------

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
2026-05-18 07:45:02 +00:00
Tim Vermeulen
cc409210c1
editor: Fix hit testing when the editor is clipped (#56861)
Fixes editor hit testing when the editor is clipped, most easily
noticeable in a partially off-screen markdown block in the agent panel.

`PositionMap::point_for_position` was indexing into `self.line_layouts`
relative to the editor's scroll position (which in this example doesn't
apply because these editors don't scroll), rather than relative to
`self.visible_row_range.start`. This caused the reported column to not
always be computed using the correct row, which especially impacted rows
closer to the bottom of the editor. Notice how closer to the bottom,
`point_for_position` reports the correct row, but reports the column as
0:


https://github.com/user-attachments/assets/2a5b2c8b-2994-4983-a33b-ede209ba00e6




Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- Fixes selection not always matching the mouse position in a markdown
block in the agent panel
2026-05-15 11:43:39 +00:00
Vitaly Slobodin
fb3218e01e
theme: Expose editor diff hunk colors (#51784)
This PR makes editor diff hunk colors configurable from themes, instead
of hardcoded values.

It introduces 6 new optional theme keys:

- `editor.diff_hunk.added.background`
- `editor.diff_hunk.added.hollow_background`
- `editor.diff_hunk.added.hollow_border`
- `editor.diff_hunk.deleted.background`
- `editor.diff_hunk.deleted.hollow_background`
- `editor.diff_hunk.deleted.hollow_border`

When a theme omits these keys, each color falls back to the existing
version-control color with the previous hardcoded opacity values:

- Light defaults:
  - background_opacity = 0.16
  - hollow_background_opacity = 0.08
  - hollow_border_opacity = 0.48
- Dark defaults:
  - background_opacity = 0.12
  - hollow_background_opacity = 0.06
  - hollow_border_opacity = 0.36

There is an existing feature request
https://github.com/zed-industries/zed/discussions/51667

## Screenshots

I used `Modus Themes` (Modus Vivendi) since these themes provide highly
accessible themes.

Original version:

<img width="3248" height="2120" alt="CleanShot 2026-03-17 at 20 26
41@2x"
src="https://github.com/user-attachments/assets/730be802-835d-436e-a1fc-4c60dcb5fce8"
/>

This version:

<img width="3248" height="2120" alt="CleanShot 2026-03-17 at 20 23
09@2x"
src="https://github.com/user-attachments/assets/785c86d3-147e-437f-9624-9576bc201551"
/>

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 theme keys for configuring editor diff hunk colors.

---------

Co-authored-by: MrSubidubi <finn@zed.dev>
2026-05-06 21:18:29 +00:00
Mikhail Pertsev
b470b50d52
editor: Extract rewrap and config out of editor.rs (#55855)
cc @SomeoneToIgnore

## Summary

Follow-up to https://github.com/zed-industries/zed/discussions/55352,
where the conclusion was to split `editor.rs` incrementally by topic
instead of all at once.

This mechanically extracts editor config and reflow-related code into
`crates/editor/src/config.rs` and `crates/editor/src/rewrap.rs`, while
preserving existing behavior and keeping externally-used APIs public
where needed.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A
2026-05-06 11:57:36 +00:00
Conrad Irwin
be705e677b
Merge gpui::Task and scheduler::Task (#53674)
Release Notes:

- N/A or Added/Fixed/Improved ...
2026-05-05 22:41:13 +00:00
Mikhail Pertsev
1da60a8518
editor: Extract Diagnostics code out of editor.rs (#55747)
cc @SomeoneToIgnore

## Summary

Follow-up to https://github.com/zed-industries/zed/discussions/55352,
where the conclusion was to split `editor.rs` incrementally by topic
instead of all at once.

This mechanically extracts diagnostics-related editor code into
`crates/editor/src/editor/diagnostics.rs` while preserving the existing
public API via re-exports.

## Testing

- `cargo check -p editor --lib`
- `cargo check -p diagnostics --lib`
- `cargo check -p diagnostics --tests`

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A
2026-05-05 15:52:45 +00:00
Chris Kievit
8d22381695
editor: Add base64 encode/decode commands (#55361)
Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Adds `editor: convert to base64` and `editor: convert from base64` to
the command palette. Both commands operate on the current selection, or
the word under the cursor when nothing is selected. The decode command
silently no-ops on invalid base64 input or non-UTF-8 decoded bytes,
consistent with how other convert commands handle untransformable input.

Release Notes:

- Added `editor: convert to base64` and `editor: convert from base64`
commands to the command palette

---------

Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com>
2026-05-05 04:36:18 +00:00
Agus Zubiaga
a03729b6c0
Handle hiding cursor on keyboard input at GPUI level (#55664)
Instead of manually handing hiding the cursor on keyboard input at the
editor level, GPUI will now take care of it.

This makes it significantly easier to handle the edge cases, and allows
delegating the cursor restoration to the platform itself in the macOS
case. On Linux and Windows, we still have to restore the cursor on
movement ourselves, but this now happens at the platform-specific level.

Bugs fixed by this change:
- No cursor when "Unsaved edits" prompt appears
- Cursor disappears when clicking a panel button if it contains a search
bar (e.g. collab panel)

### Setting rename

The `hide_mouse` setting value `"on_typing_and_movement"` has been
renamed to `"on_typing_and_action"` to better reflect what it actually
does — it hides the cursor when a keystroke resolves to an action (e.g.
cursor movement, deletion). Existing settings are migrated
automatically.

### Tested platforms
- [x] macOS
- [x] Wayland
- [x] X11
- [x] Windows
- [x] Web

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- Renamed the `hide_mouse` setting value `on_typing_and_movement` to
`on_typing_and_action` to better describe its behavior (existing
settings are auto-migrated)
- Fixed a few situations where the mouse cursor would be incorrectly
hidden
2026-05-04 22:51:56 +00:00
Neel
f88ab1bb47
git_ui: Add option to jump to project file from commit (#55088)
Using the `Open File` action from a file in commit context takes you to
a read-only snapshot of the file at the point in time of the commit.
This change makes it so you navigate to the current working copy of the
file, if one exists. This has similar semantics to copy file reference.

For a file that still exists at HEAD:
<img width="715" height="469" alt="image"
src="https://github.com/user-attachments/assets/e217e0be-b549-46fa-9d1b-eba92728fa4a"
/>

For a file that no longer exists:
<img width="438" height="271" alt="image"
src="https://github.com/user-attachments/assets/ac87465b-971b-4413-8bf3-71e49a71bdea"
/>

Release Notes:

- Add affordance to jump to project file from commit view
2026-04-29 12:07:39 +00:00
Dino
6357a85e8f
editor: Add preserve scroll strategy for go to definition (#55036)
These changes attempt to expand on the work introduced by
https://github.com/zed-industries/zed/pull/54778 by introducing a new
`GoToDefinitionScrollStrategy::Preserve` variant that attempts to keep
the cursor at the same vertical offset within the viewport when
navigating to a definition.

Most of the machinery for this was already in place. To support cases
where the user's scroll position isn't snapped to an exact display row,
for example, after scrolling with the mmouse, `Autoscroll::TopRelative`
and `Autoscroll::BottomRelative` were updated from `usize` to
`ScrollOffset`, allowing fractional offsets.

When the cursor is offscreen at the moment the `editor: go to
definition` action is invoked, `Preserve` falls back to
`Autoscroll::center`, matching the existing default for
`go_to_definition_scroll_strategy`. This avoids attempting to preserve
an offset where the cursor isn't visible which would lead to the cursor
being offscreen when jumping to the definition.

Documentation has also been updated to reflect this new strategy value.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Relates to #52173

Release Notes:

- Added a new `preserve` option to `go_to_definition_scroll_strategy`
that keeps the cursor at the same vertical position within the viewport
when navigating to a definition
2026-04-29 07:29:15 +00:00
Finn Evers
80c4c3ec93
terminal_view: Ensure reported size does not change once content becomes scrollable (#46648)
This fixes an issue where due to the scrollbar appearing, the reported
content size would shift, causing issues in the process. We now actually
always reserve space for the scrollbar appropriately as described in
https://github.com/zed-industries/zed/pull/33636 initially.

Release Notes:

- Fixed an issue where the scrollbar could cause a layout shift in the
terminal.

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2026-04-27 22:06:01 +00:00
Kirill Bulatov
315e18f5b9
Fix whitespace rendering in Zed (#54798)
Closes https://github.com/zed-industries/zed/issues/49186

<img width="403" height="136" alt="first"
src="https://github.com/user-attachments/assets/dafaa681-b921-4411-a453-8857681e50f8"
/>

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

<img width="405" height="104" alt="second"
src="https://github.com/user-attachments/assets/17e3b5df-0d61-47f3-88ff-8aeeafae1425"
/>

Release Notes:

- Fixed whitespace rendering in Zed
2026-04-25 06:11:27 +00:00
Kirill Bulatov
872faf0a7b
Exit early on mutating actions in readonly editor (#54758)
Hides and disables all mutating editor actions for readonly editors.

Certain actions (as cmd-backspace mentioned in the issue) could be
somewhat beneficial to have for navigation purposes, but we'd better
shape that story properly, let's build a "harness" and disable the
mutating ones first.

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

Release Notes:

- Fixed readonly editor having certain mutation actions enabled
2026-04-24 10:17:53 +00:00
John Tur
7d42f276f2
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
prayansh_chhablani
485181a06a
Helix jump list (#46467)
Closes #41580

This implements Helix's jump list, Zed already supports jumplists, so
all that is done is re-binding ctrl-s to to that instead. In another PR
we can extend this by adding space+j functionility to see all selections
in jumplist.

after this change:
Pressing Ctrl+S saves the current cursor position to the jumplist,
allowing the user to navigate back to this position using Ctrl+O
(backward) and Ctrl+I (forward), consistent with regular Helix's
behavior.

Release Notes:

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

---------

Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
2026-04-24 06:37:31 +00:00
Finn Evers
9b40411c6a
Fix bad GitHub merge queue merge (#54721)
No, sadly, the title is not a typo. See
https://www.githubstatus.com/incidents/zsg1lk7w13cf for the context.
I'll read with joy and popcorn through that root cause analysis.

It makes literally zero sense what happened here, but for some completly
bonkers reason GitHub completely messed up the merge queue with
https://github.com/zed-industries/zed/pull/54632.

I have no idea how it happened. It makes literally zero sense. A PR
going into the merge queue should have the same LoC when getting out of
it. GitHub obviously does not check this. GitHub causes extra work with
a feature that is supposed to save time.

Thanks, I guess.

Release Notes:

- N/A

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2026-04-23 23:47:30 +00:00
Joseph T. Lyons
a5c5dd0912
Adjust UI for gutter right-click menus (again) (#54710)
- #54632 unintentionally reverted changes introduced in #54681, likely
due to a merge conflict resolution issue.

See the original PR for the changes.

Release Notes:

- N/A

Co-authored-by: Danilo Leal <danilo@zed.dev>
2026-04-23 21:21:45 +00:00
Danilo Leal
0ab64d6414
branch_picker: Add button to filter remote branches (#54632)
This PR brings back the button to filter remote branches when accessing
the title bar's branch picker with the mouse. It was unintentionally
removed when we introduced the new worktree picker.

Release Notes:

- N/A
2026-04-23 18:26:44 +00:00
Danilo Leal
c6bdb69734
Adjust UI for gutter right-click menus (#54681)
- Don't render the tooltip while the menu is open to avoid collision
- Try to maintain the trigger element visible while the menu is open
- Tweak bookmarks icon and tooltip description copy

Release Notes:

- N/A

---------

Co-authored-by: Yara 🏳️‍⚧️ <git@yara.blue>
Co-authored-by: Joseph T. Lyons <JosephTLyons@gmail.com>
2026-04-23 17:05:51 +00:00
Neel
6f84d9be2c
editor: Fix Open File from multibuffer header jumping to wrong excerpt (#54652)
Reconciles `Open File` behaviour to the same action as using the
keybinds.

Closes #54502

Release Notes:

- Fixed a bug where the `Open File` button would not jump to the excerpt
containing the active cursor.
2026-04-23 16:42:38 +00:00
Yara 🏳️‍⚧️
8127c975bc
Fix gutter_context_menu not showing (#54574)
To hide the gutter_context_menu in collab notes (where it would be empty
anyway) we checked for the collaboration_hub. But that is unrelated to
collab notes it turns out :)

So now we check for the presence of a project which is always false for
collab notes.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #54559

Release Notes:

- N/A Fixed context menu in the editor gutter not showing when there was
a break-point set but breakpoints are not shown in the buffer.
2026-04-23 16:28:05 +00:00
Valery Borovsky
9affe8cbac
editor: Fix sticky scroll showing decorator line instead of declaration (#53288)
Fixes #49466

It looks like this wasn't actually a bug in the PHP outline query, but a
general sticky scroll bug. In PHP, the attribute ends up inside the
`function_declaration` as a child node, so sticky headers were
previously taking their start from `item.range.start` and getting stuck
on the `#[Deprecated]` line instead of `function foo()`. Switching to
`source_range_for_text.start` fixes exactly that, and also covers other
languages that put decorators or attributes before the declaration. I
added the test in TypeScript because it has the same tree shape and
covers the same class of bug as #49466


---

Before:

<img width="967" height="772" alt="Screenshot from 2026-04-07 08-46-10"
src="https://github.com/user-attachments/assets/a6b2aa2b-03f7-4abf-a4c4-c87d41df83ae"
/>


After:

<img width="1245" height="993" alt="Screenshot from 2026-04-07 08-23-32"
src="https://github.com/user-attachments/assets/27ef2487-d7fd-4a73-93e5-97fc719f9245"
/>

<img width="1245" height="993" alt="Screenshot from 2026-04-07 08-23-40"
src="https://github.com/user-attachments/assets/1b1daf80-544d-4128-bc92-b7d44b8d6564"
/>

<img width="963" height="636" alt="Screenshot from 2026-04-07 08-23-53"
src="https://github.com/user-attachments/assets/bb244ce9-797e-4a5f-b48f-eb0e4b982f7d"
/>

---

Tests:

Nextest run ID f0de6791-1a3c-406b-9589-54df870b832b with nextest
profile: default
Starting 3 tests across 1 binary (655 tests skipped)
PASS [ 0.986s] (1/3) editor editor_tests::test_sticky_scroll
PASS [ 0.436s] (2/3) editor
editor_tests::test_sticky_scroll_with_decoration_prefix_in_item
PASS [ 0.822s] (3/3) editor
editor_tests::test_sticky_scroll_with_expanded_deleted_diff_hunks
────────────
Summary [ 2.298s] 3 tests run: 3 passed, 655 skipped

Release Notes:

- Fixed sticky scroll headers showing attribute/decorator lines instead
of the declaration line in PHP and other languages where annotations are
child nodes of the declaration.

Co-authored-by: dino <dinojoaocosta@gmail.com>
2026-04-23 10:46:52 +00:00
Mikhail Pertsev
0800c007c4
editor: Add generic navigation overlays (#52630)
Closes #52629

## Overview

Adds a generic editor-owned navigation overlay primitive for rendering
target ranges, anchored labels, and fade ranges. This gives [Helix amp
jump](https://github.com/zed-industries/zed/pull/43733), [Beam
Jump](https://github.com/zed-industries/zed/pull/45387), and future
jump-style features (like [this
one](https://github.com/zed-industries/zed/issues/14801)) a shared
editor abstraction for overlay layout and paint instead of
feature-specific render paths.


###  Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable


Release Notes:

- N/A
2026-04-22 19:10:21 +00:00
João Soares
828a64c3da
Stop eagerly clearing available code actions on row change (#53571) 2026-04-22 20:03:14 +03:00
Kirill Bulatov
76883bb983
Support code lens in the editor (#54100) 2026-04-22 20:02:45 +03:00
Cameron Mcloughlin
8f0efe9f34
editor: Don't render editor behind sticky scroll header (#54465)
Previously, sticky scroll headers were painted on top of the main
editor. This works, but only if the editor background is a solid color

Bad:
<img width="603" height="319" alt="image"
src="https://github.com/user-attachments/assets/bf438003-a416-46a6-85bc-dfa767be067e"
/>


Good:
<img width="603" height="319" alt="image"
src="https://github.com/user-attachments/assets/e644e54a-6667-41e1-86d0-16e659bea844"
/>

Release Notes:

- Fixed: Editor no longer renders behind sticky scroll headers while
using a transparent theme
2026-04-22 11:22:14 +01:00
Tim Vermeulen
1e6e44874e
editor: Fix autoscroll sometimes obscuring the current row behind a sticky header (#53165)
Fixes an autoscroll bug that sometimes obscures the current row behind a
sticky header.

The bug was caused by `Editor::autoscroll_vertically` using the
`sticky_header_line_count` value that was cached during the previous
render, which isn't necessarily the number of sticky headers that the
scroll target needs, e.g.
- when jumping to a definition
- when pressing the up arrow key when the selection is in the topmost
visible row with `"vertical_scroll_margin": 0`

This fixes that by not caching `sticky_header_line_count` and instead
querying Tree-sitter on the fly to get the number of sticky headers that
the scroll target needs. Performance-wise this seem okay, I measured it
to take less than 200µs on my machine using a very large Rust file (and
there are still some possible ways to optimize this if necessary). In
particular, the pathological huge single-line file case as discussed in
#48450 shouldn't be an issue here because unlike the main sticky header
Tree-sitter query, here we query the outline items that contain a
particular point rather than those that intersect an entire row.

The `ScrollCursorTop` handler is also simplified to use the same shared
function for counting the number of sticky headers, since that action
doesn't rely on autoscroll.

Before:


https://github.com/user-attachments/assets/efb12776-82d9-4b94-baa5-347ec769fb98

After:


https://github.com/user-attachments/assets/236deb9f-fe06-43bd-b167-7bd3ab719e4c

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #50803 

Release Notes:

- Fixed sticky headers sometimes obscuring the current row.

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2026-04-21 21:29:00 +00:00
Ramon
aa5e2aef46
Fix inlay hint cursor (#54048)
https://github.com/user-attachments/assets/e7a7903b-e133-4fbf-9267-3ebb17f867ff

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #43132

Release Notes:

- Fixed inlay hints navigating to the wrong position
2026-04-21 10:29:18 +00:00
Jason Lee
84dcf38dbe
gpui: Improve Anchored to support center position (#47154)
Release Notes:

- N/A

Ref https://github.com/longbridge/gpui-component/pull/1956 extract my
fork version of `anchored.rs` to let GPUI to support position Anchored
at center.


https://github.com/user-attachments/assets/8d0230ed-4b75-440b-b8c3-9bde3decd141

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 09:01:42 +00:00
Piotr Osiewicz
555326aea4
editor: Fix soft-wrap in auto-height editors (#54051)
We had an internal report of soft wrap not working in git panel's commit
editor. Given the following settings:
```json
{
  "languages": {
    "Git Commit": {
      "preferred_line_length": 80,
      "soft_wrap": "preferred_line_length",
    },
  },
}
```
We would not soft-wrap in narrow viewports. As it turned out, the
problem was that we were always prefering a `preferred_line_length` as
our soft wrap boundary over the actual width of the editor.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [ ] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #ISSUE

Release Notes:

- Fixed git commits editor not respecting soft wrap boundaries.
- settings: Removed `"soft_wrap": "preferred_line_length"` in favour of
`"soft_wrap": "bounded"`. Soft wrap now always respects editor width
when it's enabled.
2026-04-18 00:55:44 +02:00
Yara 🏳️‍⚧️
73126dcb81
editor: Introduce Bookmarks (#54174)
Adds basic bookmark functionality to the editor, allowing users to mark
lines and later navigate between them. This is an MVP and will later be
expanded with a picker, vim marks integration and syntax tree based
bookmark positions. In this MVP bookmarks shift under external edits.

# UI
## Adding/Removing bookmarks
To add a bookmark:
- run the toggle bookmark action 
- hold secondary and click in the gutter
- open the context menu by right clicking in the gutter and select add
bookmark To remove a bookmark:
- run the toggle bookmark action 
- click on the bookmarks icon in the gutter
- open the context menu by right clicking in the gutter and select
remove bookmark

remove all bookmarks with `workspace: clear bookmarks`


# Implementation
This mirrors the implementation of breakpoints. The rendering of the
gutter was refactored to make place for bookmark icons and buttons:
- Code was extracted to a `Gutter` struct
- Runnables, breakpoints and bookmarks are now collected ahead of
layouting. Just before layouting we remove the items that collide and do
not have priority.
- The `phantom_breakpoint` is replaced by a `gutter_hover_button`

## In depth phantom breakpoint discussion:
This was phantom_breakpoint. It worked as follows:
 - A fake breakpoint was added to the list of breakpoints.
- While rendering the breakpoints it a breakpoint turned out to be fake
it would get a different description and look.
- The breakpoint list was edited run_indicators ("play buttons")
rendering to removes the fake breakpoint if it collided.

This would not scale to more functionality. Now we only render
breakpoints, bookmarks and run indicators. Then we render a button if
there is not breakpoint, bookmark or run indicator already present. We
can do so since the rendering of such "gutter indicators" has been
refactored into two phases:
 - collect the items.
 - render them if no higher priority item collides.

This is far easier and more readable which enabled me to easily take the
phantom_breakpoint system and use it for placing bookmarks as well :)

Note: this was previously merged but it needed a better squashed commit
message. For the actual PR see: 51404. This reverts commit
7e523a2d2b.

Release Notes:

- Added Bookmarks

Co-authored-by: Austin Cummings <me@austincummings.com>
2026-04-17 13:54:43 +02:00
Yara 🏳️‍⚧️
7e523a2d2b
Revert "editor: Bookmarks MVP" to update its description (#54163)
Reverts zed-industries/zed#51404 because I forgot to updated the
squashed commits description ....
2026-04-17 10:55:05 +00:00
Austin Cummings
79473da756
editor: Bookmarks MVP (#51404)
Closes #4526

Adds basic bookmark functionality to the editor, allowing users to mark
lines and later navigate between them.

### What's new

**Toggling bookmarks**
Users can toggle a bookmark on the current line(s) via the `editor:
toggle bookmark` action. A bookmark icon appears in the gutter for each
bookmarked line.

**Navigation**
Two new actions, `editor: go to next bookmark` and `editor: go to
previous bookmark`, navigate between bookmarks in the current buffer,
wrapping around at the ends of the buffer.

**Viewing all bookmarks**
`editor: view bookmarks` opens all bookmarks across the project in a
multibuffer, similar to how references and diagnostics are surfaced.

**Clearing bookmarks**
`workspace: clear bookmarks` removes all bookmarks in the current
project.

**Persistence**
Bookmarks are persisted to the workspace database and restored when the
workspace is reopened. They are stored as `(path, row)` pairs and
resolved back to text anchors. Out of range or unresolvable bookmarks
are skipped with a logged warning.

**Gutter rendering**
Bookmark icons are rendered in the gutter using the existing gutter
button layout system, consistent with breakpoints. They are suppressed
on lines that already show a breakpoint or phantom breakpoint indicator.
A new `gutter.bookmarks` setting (defaulting to `true`) controls their
visibility.

### What's left

- [x] Lazily load buffers that have bookmarks
- [x] Clean up test boilerplate
- [ ] Assign default keybindings
- [ ] Compare line of saved bookmarks with current buffer (gray out the
"stale" bookmarks)

### What's next (and nice to haves)
- [ ] Resilience against external edits
- [ ] Save column position with the bookmark
- [ ] Bookmarks attached to syntactic structures?
- [ ] Labeled bookmarks?

---

Release Notes:

- Added bookmarks: toggle bookmarks on lines with `editor: toggle
bookmark`, navigate with `editor: go to next bookmark` / `editor: go to
previous bookmark`, view all bookmarks with `editor: view bookmarks`,
and clear with `workspace: clear bookmarks`. Bookmarks are shown in the
gutter and persisted across sessions.

---------

Co-authored-by: Yara <git@yara.blue>
2026-04-17 12:39:07 +02:00
Tim Vermeulen
7d365ef26c
editor: Defer rendering the git blame popover until after the markdown is parsed (#52231)
Fixes this single-frame glitch that sometimes occurs when the git blame
popover is rendered before the markdown has been parsed.


https://github.com/user-attachments/assets/d5a322c3-e46f-4597-a10f-a676da57daa7

## Self-Review Checklist

<!-- Check before requesting review: -->
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- Fixed a visual glitch where the git blame popover could briefly appear
empty while its markdown content was being parsed
2026-04-16 14:17:39 +00:00
Pratik Karki
b6b2b63370
Gate Format Selections on whether the active formatter can actually format ranges (#53178)
## What Changed

- compute range-format support from formatter configuration and
language-server capabilities
- show `Format Selections` only when at least one selected buffer has a
range-capable formatter
- keep Prettier-supported range formatting available without depending
on LSP support
- hide the action for formatter modes that cannot honor selections, such
as external-command and code-action formatters
- keep the action handler safe by rechecking support and returning early
when range formatting is unavailable
- restrict capability checks to the servers actually registered for the
current buffer
- add regression coverage for supported, unsupported, and mixed-server
cases
- document when `Format Selections` is available in both action docs and
user docs


Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #25796

Release Notes:
- Improved `Format Selections` so it is only shown when the active
formatter supports range formatting.

Testing I did:

Here are the formatters I used:
<img width="829" height="434" alt="Screenshot_20260405_102047"
src="https://github.com/user-attachments/assets/cae4a238-277e-4188-873f-189e9f098699"
/>

Note: I've chosen three formatters:
1. Prettier, which supports range formatting
2. clangd (LSP) which also supports range formatting
3. gopls which do not support range formatting


[Screencast_20260405_102431.webm](https://github.com/user-attachments/assets/69ce3f95-0b73-46a0-853d-3b5be6329dde)

---------

Signed-off-by: Pratik Karki <pratik@prertik.com>
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
2026-04-16 09:11:22 +03:00
Kirill Bulatov
3c4e235d67
Add settings and disable mouse wheel zoom by default (#53622)
Follow-up of https://github.com/zed-industries/zed/pull/53452

Release Notes:

- N/A
2026-04-10 12:34:50 +00:00
Kirill Bulatov
2635ef55c6
Restrict mouse wheel zoom for certain editors (#53598)
Follow-up of https://github.com/zed-industries/zed/pull/53452

* disables mouse wheel zooming in agent, debugger, keymap editor, dev
inspector and repl-related editors
* adjusts the code to call for theme changes directly instead of sending
the events, so that agent following does not capture the events and
changes its font size

Release Notes:

- N/A
2026-04-10 09:20:38 +00:00
Sean Hagstrom
4fd2baf92f
editor: Add Ctrl+scroll wheel zoom for buffer font size (#53452)
Closes https://github.com/zed-industries/zed/pull/53452

Release Notes:

- Add event handling on editor to increase/decrease font-size when using
the scroll-wheel and holding the secondary modifier (Ctrl on
Linux/Windows, and Cmd on macOS)

Screen Capture:


https://github.com/user-attachments/assets/bf298be4-e2c9-470c-afef-b7e79c2d3ae6

---------

Co-authored-by: Dmitry Soluyanov <dimitri.soluyanov@yandex.ru>
2026-04-09 12:10:39 +03:00
ozacod
525f10a133
editor: Add action to toggle block comments (#48752)
Closes #4751

## Testing
- Manually tested by comparing the behaviors with vscode.
- Those requirements are added to unit tests.

Release Notes:

- Added action to toggle block comments

---------

Co-authored-by: ozacod <ozacod@users.noreply.github.com>
2026-04-08 22:29:16 +03:00
Xin Zhao
3ed1c32bf9
editor: Fix diagnostic rendering when semantic tokens set to full (#53008)
Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #50212

There are two unreasonable coupling account for this issue, the coupling
of `use_tree_sitter` with `languge_aware` in

7892b93279/crates/editor/src/element.rs (L3820-L3822)
and the coupling of `language_aware` with `diagnostics` in
7892b93279/crates/language/src/buffer.rs (L3736-L3746)

Because of these couplings, when the editor stops using Tree-sitter
highlighting when `"semantic_tokens"` set to `"full"`, it also
accidentally stops fetching diagnostic information. This is why error
and warning underlines disappear.

I’ve fixed this by adding a separate `use_tree_sitter` parameter to
`highlighted_chunks`. This way, we can keep `language_aware` true to get
the diagnostic data we need, but still decide whether or not to apply
Tree-sitter highlights. I chose to fix this at the `highlighted_chunks`
level because I’m worried that changing the logic in the deeper layers
of the DisplayMap or Buffer might have too many side effects that are
hard to predict. This approach feels like a safer way to solve the
problem.

Release Notes:

- Fixed a bug where diagnostic underlines disappeared when
"semantic_tokens" set to "full"

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
2026-04-07 14:15:33 +00:00
Cole Miller
2a15bf630d
Require multibuffer excerpts to be ordered and nonoverlapping (#52364)
TODO:
- [x] merge main
- [x] nonshrinking `set_excerpts_for_path`
- [x] Test-drive potential problem areas in the app
- [x] prepare cloud side
- [x] test collaboration
- [ ] docstrings
- [ ] ???

## Context

### Background

Currently, a multibuffer consists of an arbitrary list of
anchor-delimited excerpts from individual buffers. Excerpt ranges for a
fixed buffer are permitted to overlap, and can appear in any order in
the multibuffer, possibly separated by excerpts from other buffers.
However, in practice all code that constructs multibuffers does so using
the APIs defined in the `path_key` submodule of the `multi_buffer` crate
(`set_excerpts_for_path` etc.) If you only use these APIs, the resulting
multibuffer will maintain the following invariants:

- All excerpts for the same buffer appear contiguously in the
multibuffer
- Excerpts for the same buffer cannot overlap
- Excerpts for the same buffer appear in order
- The placement of the excerpts for a specific buffer in the multibuffer
are determined by the `PathKey` passed to `set_excerpts_for_path`. There
is exactly one `PathKey` per buffer in the multibuffer

### Purpose of this PR

This PR changes the multibuffer so that the invariants maintained by the
`path_key` APIs *always* hold. It's no longer possible to construct a
multibuffer with overlapping excerpts, etc. The APIs that permitted
this, like `insert_excerpts_with_ids_after`, have been removed in favor
of the `path_key` suite.

The main upshot of this is that given a `text::Anchor` and a
multibuffer, it's possible to efficiently figure out the unique excerpt
that includes that anchor, if any:

```
impl MultiBufferSnapshot {
    fn buffer_anchor_to_anchor(&self, anchor: text::Anchor) -> Option<multi_buffer::Anchor>;
}
```

And in the other direction, given a `multi_buffer::Anchor`, we can look
at its `text::Anchor` to locate the excerpt that contains it. That means
we don't need an `ExcerptId` to create or resolve
`multi_buffer::Anchor`, and in fact we can delete `ExcerptId` entirely,
so that excerpts no longer have any identity outside their
`Range<text::Anchor>`.

There are a large number of changes to `editor` and other downstream
crates as a result of removing `ExcerptId` and multibuffer APIs that
assumed it.

### Other changes

There are some other improvements that are not immediate consequences of
that big change, but helped make it smoother. Notably:

- The `buffer_id` field of `text::Anchor` is no longer optional.
`text::Anchor::{MIN, MAX}` have been removed in favor of
`min_for_buffer`, etc.
- `multi_buffer::Anchor` is now a three-variant enum (inlined slightly):

```
enum Anchor {
    Min,
    Excerpt {
        text_anchor: text::Anchor,
        path_key_index: PathKeyIndex,
        diff_base_anchor: Option<text::Anchor>,
    },
    Max,
}
```

That means it's no longer possible to unconditionally access the
`text_anchor` field, which is good because most of the places that were
doing that were buggy for min/max! Instead, we have a new API that
correctly resolves min/max to the start of the first excerpt or the end
of the last excerpt:


```
impl MultiBufferSnapshot {
    fn anchor_to_buffer_anchor(&self, anchor: multi_buffer::Anchor) -> Option<text::Anchor>;
}
```
- `MultiBufferExcerpt` has been removed in favor of a new
`map_excerpt_ranges` API directly on `MultiBufferSnapshot`.

## Self-Review Checklist

<!-- Check before requesting review: -->
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
Co-authored-by: Conrad <conrad@zed.dev>
2026-04-01 17:25:32 +00:00
Tim Vermeulen
4a0c02b69c
editor: Prevent blame popover from appearing when cursor is on different pane (#52603)
The blame popover shouldn't appear when the cursor hovers over the
annotation but on a different pane.

Before:


https://github.com/user-attachments/assets/dbf6f7b5-e27f-495b-8d6f-fa75a4feee18

After:


https://github.com/user-attachments/assets/d5e186df-4ebf-4b4c-bb5f-4d9e7b0f62c7

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- Fixed a bug that caused git blame annotations to be hoverable from a
different pane.
2026-04-01 14:41:50 +00:00
Tim Vermeulen
dcef83e413
editor: Clear previous select mode when clicking on a sticky header (#52636)
Clicking on a sticky header causes
`selections.select_ranges([anchor..anchor])` to be called, but this does
not clear the editor's `selections.select_mode()`, resulting in possible
incorrect selections if this is followed up by a shift-click. This PR
fixes that with
```diff
- selections.select_ranges([anchor..anchor]);
+ selections.clear_disjoint();
+ selections.set_pending_anchor_range(anchor..anchor, SelectMode::Character);
```
which is essentially what `editor.select(SelectPhase::Begin { ... },
...)` (i.e. a regular single click in the editor) does as well.

Before:


https://github.com/user-attachments/assets/bcf2647e-a22a-4866-8975-d29e135df148

After:


https://github.com/user-attachments/assets/fb82db51-fef1-4b7c-9954-6e076ae0b176

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- Fixed bug that caused clicking on a sticky header to not always
properly clear the previous selection.
2026-04-01 14:29:27 +00:00
Tim Vermeulen
3a6faf2b4a
editor: Deduplicate sticky header rows (#52844)
Fixes a bug that caused duplicate sticky header rows to appear if
multiple outline items start on the same row.

Sort of addresses #52722, although arguably the real issue there is that
duplicate outline items are being created in the first place.

Before:


https://github.com/user-attachments/assets/7941cbe8-9b62-470c-b475-f08f2f20fac6

After:


https://github.com/user-attachments/assets/c4e291ea-6414-483f-8ff7-3d89d10000b6

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- Fixed a bug that caused duplicate sticky header rows to appear if
multiple outline items start on the same row.
2026-03-31 18:56:49 +00:00
Yao Xiao
7f7520b98e
agent_ui: Fix expanded message editor jitters while typing (#52612)
Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #52132.

*This PR previously also fixes the "expanded message editor not taking
up full height" part, but #52545 has already fixed that. Yet it seems to
leave a new issue (that was previously not revealed) behind, as
follows.*

This PR fixes the `Full + ExcludeOverscrollMargin` editor mode (which
the agent panel message editor uses in expanded mode), which could
jitter while typing because render-time layout and scroll-position
updates were clamping against different effective
`scroll_beyond_last_line` policies. This PR fixes that inconsistency so
the expanded editor stays stable while typing, and adds a regression
test covering `ExcludeOverscrollMargin` scroll clamping.


https://github.com/user-attachments/assets/86abf04d-c1a1-419b-96d0-8ca097c0acb0


https://github.com/user-attachments/assets/03dbdc3c-f58e-4378-8c6a-4bda1ae425c8

Release Notes:

- Fixed the expanded Agent Panel message editor so it no longer jitters
while typing.

---------

Co-authored-by: MrSubidubi <finn@zed.dev>
2026-03-30 08:19:09 +00:00
Piotr Osiewicz
93e641166d
theme: Split out theme_settings crate (#52569)
Self-Review Checklist:

- [ ] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [ ] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [ ] Performance impact has been considered and is acceptable

Closes #ISSUE

Release Notes:

- N/A
2026-03-27 14:41:25 +01:00
Lukas Wirth
e5150abe6f
editor: Place cursor at clicked column when clicking sticky headers (#51911)
When clicking on a sticky header line, the cursor is now placed at the
column corresponding to the click position, rather than always at the
start of the outline item's range. The hover cursor is also changed from
a pointing hand to an I-beam to reflect that clicking behaves like
clicking in normal editor text.

Release Notes:

- Clicking a sticky header now puts the cursor at the clicked column
2026-03-19 14:49:30 +01:00