Commit graph

4844 commits

Author SHA1 Message Date
Om Chillure
7a61562845
Fix title/camelCase commands stripping leading indentation Fixes (#50523)
Fixes: #48945

Description:

The convert:to-title-case, convert:to-upper-camel-case, and
convert:to-lower-camel-case editor commands were stripping leading
whitespace from each line of a multi-line selection.

Root cause: The conversion functions split on whitespace using
.split_whitespace() and then joined the resulting words, discarding any
leading spaces/tabs before the first word on each line.

Fix: Each line now preserves its leading whitespace by capturing and
re-prepending it before applying the case conversion.

Tests: Added test cases covering multi-line selections with indentation
for all three commands.

Video : 


[bug1fix.webm](https://github.com/user-attachments/assets/f4d25c55-bc6d-44e6-a989-7d9b4bc59ac9)

Release Notes:

- Fixed trailing whitespace handling on text case changes
2026-03-12 19:33:48 +00:00
Finn Evers
dcab464608
editor: Fix gutter hitbox hover check (#51405)
The gutter hitbox would previously check the hover using the position,
ignoring any occluding hitboxes rendered above it.

This would then trigger the crease toggles to show which should not
happen in that case, since the gutter was not really hovered.

Release Notes:

- Fixed an issue where the crease toggles in the gutter would sometimes
show when interacting with a popover present over the editor gutter.
2026-03-12 17:49:36 +00:00
Lee ByeongJun
4bd1a090d9
editor: Fix bracket colorization with folds and large functions (#51108)
Closes #47846

`visible_excerpts` computed the visible buffer range by adding display
line count directly to the buffer start row:

```rust
// Before
multi_buffer_visible_start + Point::new(visible_line_count, 0)
```
This ignores folds entirely. When a 700-line function is folded into one
display line, content after the fold is visible on screen but falls
outside the computed buffer range, so its brackets are never colorized.

The fix converts through display coordinates so the fold/wrap layers are
respected:

```rust
// After
let display_end = DisplayPoint::new(display_start.row + visible_line_count, 0);
let multi_buffer_visible_end = display_end.to_point(&display_snapshot);
```

### Results

**Before Fix**
<img width="852" height="778" alt="스크린샷 2026-03-10 오후 8 29 10"
src="https://github.com/user-attachments/assets/a0d2d81f-a8b2-4cf4-b1f3-cf5f8288a696"
/>

**After Fix**
<img width="1031" height="794" alt="스크린샷 2026-03-10 오후 8 32 27"
src="https://github.com/user-attachments/assets/2b0496b1-8302-4248-b73a-c31f5d0b0c4b"
/>

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
- [ ] Done a self-review taking into account security and performance
aspects
- [ ] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- Fixed bracket colorization not working for content after folded
regions and for functions with large bodies.

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
2026-03-12 17:09:23 +00:00
Viraj Bhartiya
4842e095d9
editor: Skip stop_at_indent for single-line editors (#50681)
In single-line editors like the Find bar, MoveToBeginningOfLine with
stop_at_indent should go directly to column 0 instead of stopping at the
indentation level.

Closes #50634

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
- [ ] Aligned any UI changes with the [UI
checklist](https://github.com/zedindustries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- Fixed `MoveToBeginningOfLine` stopping at indentation in single-line
editors like the Find bar instead of moving to column 0.
2026-03-12 18:28:21 +02:00
Shashank Suresh
4d5e25f408
editor: Add line range support to editor::CopyFileLocation command (#51328)
Closes #51309

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:

- Improved `editor::CopyFileLocation` command to include the full
selected line range (e.g. 'src/main.rs:12-18') when multiple lines are
selected, rather than only the first line number.
2026-03-12 09:22:55 +00:00
daydalek
f713373d10
editor: Persist multi-line diagnostic hovers in whitespace areas (#47471)
When the mouse cursor moves into the whitespace of a line within a
multi-line diagnostic range, the hover popover would previously
disappear. This change adds a check to keep the diagnostic hover visible
if the mouse row intersects with the active diagnostic's range.

Fixes #46841

Release Notes:

- Improved hover behavior for multi-line diagnostics to persist when
hovering over whitespace.


https://github.com/user-attachments/assets/0965cb25-6207-4d4a-9165-0d51157fc6e4
2026-03-11 19:06:22 +02:00
Kirill Bulatov
2b425aa102
Limit editors' refresh runnables (#51299)
Before, both rust-analyzer's LSPext tasks and tree-sitter tasks were
queried on the entire multi buffer range.

The PR moves all runnable-related logic into a submodule, and reworks
the logic to consider only the visible buffers.
Singleton buffers have their tasks resolved for the entire range still
(same as LSPext tasks work), multi buffers have their buffers' data
cached and reused.

Release Notes:

- Improved multi buffer's runnables resolution performance
2026-03-11 15:05:22 +00:00
Kirill Bulatov
2c59990135
Do not load runnables and diagnostics in git panel (#51270)
Release Notes:

- N/A

---------

Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
2026-03-11 10:51:54 +00:00
Anthony Eid
86a757237e
ui: Add close and confirm button to breakpoint edit prompt block (#51239)
This fixes a problem with our breakpoint prompt edit component where
there was no way through the mouse to close/confirm the edit a user was
making.


### Before
<img width="2382" height="108" alt="image"
src="https://github.com/user-attachments/assets/6ee7e26e-9f90-4c54-8bde-52b5f3084755"
/>
### After
<img width="1071" height="58" alt="Screenshot 2026-03-11 at 12 16 38 AM"
src="https://github.com/user-attachments/assets/8da5b499-90f6-4044-835a-302431ea934f"
/>

Before you mark this PR as ready for review, make sure that you have:
- [ ] 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:

- N/A
2026-03-10 23:30:57 +00:00
Lukas Wirth
b21f4a3deb
Prevent remote edits from triggering edit predictions when collaborating (#51196)
BufferEvent::Edited had no way to distinguish local edits from remote
(collaboration) edits. This caused edit prediction behavior to fire on
the guest's editor when the host made document changes.

Release Notes:

- Fixed edit predictions triggering on collaboration guests when the
host edits the document.

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
2026-03-10 15:23:49 +00:00
Dino
fbeffc4f37
Fix expand/collapse all button for splittable editor (#50859)
The "Expand All Files"/"Collapse All Files" button in `BufferSearchBar`
was broken for `SplittableEditor`, which is used in the project diff
view. It was happening because `ProjectDiff::as_searchable` returns an
handle to the `SplittableEditor`, which the search bar implementation
then tries to downcast to an `Editor`, which the `SplittableEditor` did
not support, so both the expand/collapse all buttons, as well as the
collapse state were broken.

Unfortunately this was accidentally introduced in
https://github.com/zed-industries/zed/pull/48773 , so this Pull Request
updates the `Item` implementation for `SplittableEditor` in order for it
to be able to act as an `Editor`.

Release Notes:

- Fix the "Expand All Files"/"Collapse All Files" button in the project
diff view

---------

Co-authored-by: Tom Houlé <tom@tomhoule.com>
2026-03-09 17:45:36 +00:00
Kirill Bulatov
d788673f1e
Do not derive symbol highlights if they do not fit into multi buffer (#50948)
Release Notes:

- N/A

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2026-03-09 15:50:44 +00:00
Piotr Osiewicz
97421c670e
Remove unreferenced dev dependencies (#51093)
This will help with test times (in some cases), as nextest cannot figure
out whether a given rdep is actually an alive edge of the build graph

Closes #ISSUE

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

Release Notes:

- N/A
2026-03-09 13:22:12 +01:00
Dino
0a436bec17
git: Introduce restore and next action (#50324)
Add a `git::RestoreAndNext` action that restores the diff hunk at the
cursor and advances to the next hunk. In the git diff view, the default
restore keybinding (`cmd-alt-z` on macOS, `ctrl-k ctrl-r` on
Linux/Windows) is remapped to this action so users can quickly restore
hunks in sequence. Also refactor `go_to_hunk_before_or_after_position`
to accept a `wrap_around` parameter, eliminating duplicated
hunk-navigation logic in `do_stage_or_unstage_and_next` and
`restore_and_next`.

Release Notes:

- Added a `git: restore and next` action that restores the diff hunk at
  the cursor and moves to the next one. In the git diff view, the
  default restore keybinding (`cmd-alt-z` on macOS, `ctrl-k ctrl-r` on
  Linux/Windows) now triggers this action instead of `git: restore`.

---------

Co-authored-by: Afonso <4775087+afonsograca@users.noreply.github.com>
2026-03-09 10:50:43 +00:00
Lukas Wirth
8d5689a7fa
editor: Fix underflow panic in block map sync when blocks overlap (#51078)
In `BlockMap::sync`, blocks within an edited region are sorted and
processed sequentially. Each block placement computes
`rows_before_block` by subtracting `new_transforms.summary().input_rows`
from the block's target position. The `Near`/`Below` cases have a guard
that skips the block if the target is already behind the current
progress, but `Above` and `Replace` were missing this guard.

When a `Replace` block (tie_break 0) is processed before an `Above`
block (tie_break 1) at the same or overlapping position, the `Replace`
block consumes multiple input rows, advancing `input_rows` past the
`Above` block's position. The subsequent `position - input_rows`
subtraction underflows on `u32`, producing a huge `RowDelta` that wraps
`wrap_row_end` past `wrap_row_start`, creating an inverted range that
propagates through the display map layers and panics as `begin <= end
(47 <= 0)` in a rope chunk slice.

Add underflow guards to `Above` and `Replace`, matching the existing
pattern in `Near`/`Below`.

Release Notes:

- Fixed a source of underflowing subtractions causing spurious panics
2026-03-09 08:45:46 +00:00
Lukas Wirth
3f2ddcbca3
editor: Prevent panic in lsp_symbols_at_cursor with diff hunks handling (#51077)
Fixes ZED-5M9

No test as I couldn't quite reproduce this, as the cause is mostly a
guess

Release Notes:

- Fixed a panic in `lsp_symbols_at_cursor` when dealing with diff hunks
2026-03-09 08:35:19 +00:00
John Tur
4031db17df
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
Cameron Mcloughlin
33e5301946
gpui: Add property_test macro (#50935)
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2026-03-06 14:03:45 +00:00
João Soares
e3d0a35b73
Fix formatter: "auto" to skip language servers that can't format (#50661)
Closes #50631

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
- [ ] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- Fixed `formatter: "auto"` silently doing nothing when the first
language server for a language doesn't support formatting (e.g., Dependi
before Tombi for
TOML).
2026-03-06 09:31:33 +00:00
Karthik Nishanth
e9ffef0bfa
editor: Hide hover links when mouse cursor is not visible (#50424)
When I am in the middle of editing, pressing Ctrl would
counter-intuitively highlight links even when the mouse cursor is
hidden. This change considers the state of the mouse cursor before
painting links on hover.

Before: Modifier pressed, cursor hidden, link visible

<img width="506" height="518" alt="image"
src="https://github.com/user-attachments/assets/82a59e83-e3cb-490f-b292-148686ec569d"
/>

After: Modifier pressed, cursor hidden (red dot indicates current cursor
position)

<img width="408" height="298" alt="image"
src="https://github.com/user-attachments/assets/c19ed83c-4778-4890-97b9-5155cdcf658b"
/>

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:

- Fixed spurious link highlighting when mouse cursor is hidden

Fixes #50776
2026-03-06 07:53:24 +00:00
Cameron Mcloughlin
3fb377b779
git: Side by side spacer mouse cursor (#50814) 2026-03-05 11:15:26 +00:00
Bennet Bo Fenner
1a8005f24a
editor: Respect read_only in newline_below (#50804)
Turns out `Editor::newline_below` was not respecting the `read_only`
flag because it uses buffer.edit. `Editor::newline` and
`Editor::newline_above` behaved correctly because they used
`editor.edit` which ignores edits if `read_only` is true.

Added an early return if the editor is read only, also added it to
newline/newline_above for clarity.

Release Notes:

- Fixed an issue where newlines could be inserted into read-only editors
2026-03-05 10:07:52 +00:00
Oliver Azevedo Barnes
9938ebefbc
editor: Add support for no auto-indent on enter (#47751)
Closes #47550

Changes the `auto_indent` setting from a boolean to an enum with three
modes:

- **`full`** (default): Adjusts indentation based on syntax context when
typing (previous `true` behavior)
- **`preserve_indent`**: Preserves the current line's indentation on new
lines, but doesn't adjust based on syntax
- **`none`**: No automatic indentation - new lines start at column 0
(previous `false` behavior)

This gives users more control over indentation behavior. Previously,
setting `auto_indent: false` would still preserve indentation on new
lines, which was unexpected.

Includes:
- Settings migration from boolean to enum values
- Settings UI dropdown renderer

Release Notes:

- Changed `auto_indent` setting from boolean to enum with `full`,
`preserve_indent`, and `none` options

<img width="1373" height="802" alt="Screenshot 2026-01-27 at 16 32 10"
src="https://github.com/user-attachments/assets/b629e1d8-7359-4853-8222-abfa71d6ebe2"
/>

---------

Co-authored-by: MrSubidubi <finn@zed.dev>
2026-03-04 20:29:20 +00:00
Dino
0b58d34936
editor: Refactor excerpts removed event handling (#50695)
Refactor the changes introduced in
https://github.com/zed-industries/zed/pull/50525, in order to remove the
`DisplayMap.clear_folded_buffer` method and update the editor's handling
of `multi_buffer::Event::ExcerptsRemoved` to actually call
`DisplayMap.unfold_buffers`, which correctly updates the `BlockMap`
using its `BlockMapWriter`, ensuring that the block map is synced.

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:

- N/A
2026-03-04 13:11:40 +01:00
ᴀᴍᴛᴏᴀᴇʀ
932981fca1
editor: Prevent underlines from appearing in minimap (#48510)
I noticed that the minimap seems to render underlines with the same
thickness as the main editor, which looks a bit off. This becomes much
more noticeable when enabling `semantic_token_rules` (due to the
increased number of underlines):

```json
"global_lsp_settings": {
  "semantic_token_rules": [
    {
      "token_modifiers": ["mutable"],
      "underline": true,
    },
  ],
}
```
Looking at the existing code, I found that diagnostic underlines already
check `editor_style.show_underlines` to ensure they are only displayed
in the main editor. To maintain consistency, I applied the same
filtering logic to `chunk_highlight` so that these underlines are no
longer rendered in the minimap.

Before:
<img alt="CleanShot 2026-02-06 at 02 28 31@2x"
src="https://github.com/user-attachments/assets/16401154-23f5-43ef-a7a8-b1035c19e076"
/>
After:
<img alt="CleanShot 2026-02-06 at 02 31 36@2x"
src="https://github.com/user-attachments/assets/979a04be-e585-44be-9c42-4dfab7b89186"
/>

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-03-04 11:59:08 +00:00
Cole Miller
38c7e63af3
git: Fix commit message buffer header not being disabled after cloning commit view (#50606)
Release Notes:

- Fixed extraneous buffer header when splitting the commit view.
2026-03-03 15:52:00 +00:00
dybucc
815c6f5141
Add small alloc and lookup optimizations (#49041)
A vector was being instantiated when the callsite only required an
iterable.

Another part of the code was performing multiple `contains()` lookups on
a vector, and now it does it on a hashed set. This change has required
some extra modifications across the codebase, but the affected sites are
minimal and have been adjusted without major issues.

The changes include some `Hash` derived implementations, which were
proposed in the original `lsp-types` in [[1]], and maybe could be merged
into Zed's fork. I went ahead and used a newtype with a custom `Hash`
implementation that simply called on the structure's public members'
implementations of `Hash`.

The next change includes the removal of a check of the request
capabilities after having already checked the same thing in the call to
`to_lsp_params_or_response()` right before. The result of the `match`
expression should already have returned a `Task::ready()` if the above
mentioned function failed in performing the check that was later
repeated and now removed.

Finally, in the `edits_from_lsp()` method, stable sorting was being
performed when only unstable sorting would suffice. The method can only
sort with respect to the key data, and not the satellite data, as the
latter are the literal strings of the edit. It matters not which one of
a sequence of overlapping edits (with same ranges that thus resolve the
edits for equivalence) should come before the other.

[1]:
https://github.com/gluon-lang/lsp-types/pull/295/changes#diff-b1a35a68f14e696205874893c07fd24fdb88882b47c23cc0e0c80a30c7d53759R540

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

Release Notes:

- Removed a vector allocation where the callsite only required an
iterable.
- Improved multiple lookup operations when deserializing LSP edit
operations.
- Removed a double-check of capabilities after requesting and thus
determining LSP capabilities.
- Replaced stable sorting with unstable sorting of edits returned by the
LSP.
2026-03-02 21:28:12 -07:00
Conrad Irwin
3f6a6cfabf
Truncate tabs in filenames (#50550)
Closes #19208

Authored-By: @ngauder 

Release Notes:

- Editor: truncate long file names in tab titles

---------

Co-authored-by: Nikolas Gauder <nikolas.gauder@tum.de>
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-03-02 19:50:52 -07:00
it-education-md
465e2b5ffd
editor: Avoid autoscroll in SplitSelectionIntoLines (#49399)
Closes #48812

## Summary
`editor::SplitSelectionIntoLines` currently triggers autoscroll and can
jump to the end of a long file.
This PR makes the action explicitly no-scroll.

## What changed
- Disabled autoscroll in the `unfold_ranges` call inside
`split_selection_into_lines`.
- Switched selection update to `SelectionEffects::no_scroll()`.

## Testing
- Added `test_split_selection_into_lines_does_not_scroll`.

### Screenshots:
- Before:   see issue video
- After:
<img width="2486" height="1299" alt="image"
src="https://github.com/user-attachments/assets/8408a2f1-7dd7-4984-aa89-927d5a588322"
/>


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:

- Stop scrolling on `editor::SplitSelectionIntoLines` called in the long
files
2026-03-02 22:45:19 +00:00
Kirill Bulatov
7ad524661d
Remove Supermaven-related code from Zed (#50537)
Follow-up of https://github.com/zed-industries/zed/pull/49317

See also https://supermaven.com/blog/sunsetting-supermaven

- N/A
2026-03-02 22:18:49 +00:00
Dino
1f11592d93
editor: Remove folded buffer ID on all excerpts removed (#50525)
Fix a bug in the editor's handling of the
`multi_buffer::Event::ExcerptsRemoved` event, where the display map's
`folded_buffers` set was not updated according to the list of removed
buffer ids.

Since the `ProjectSearchView` now relies on the
`Editor.has_any_buffer_folded` method in order to decide the state of
the expand/collapse all excerpts button this could lead to a
bug where, after an initial project search, all excerpts would be
collapsed, and performing a new search would leave the button in a wrong
state, as all excerpts from the new search result would be expanded, but
the button would still consider that there were folded excerpts for the
buffers.

Closes #50521

Release Notes:

- Fixed bug in project search where collapsing a single buffer then
performing a new search in the same view, would break the
expand/collapse all button behavior
2026-03-02 22:13:09 +00:00
Marco Mihai Condrache
f0620c6f8f
editor: Preserve compound emojis (#50082)
Closes #45466

Emojis like 🧑‍✈️ are grapheme clusters formed using zero-width joiners
and variation selectors. Iterating over the string by individual chars
in `highlight_invisibles` breaks these clusters, even though they
represent a single visible character.

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

Release Notes:

- Zed now supports compound emojis
2026-03-02 22:33:05 +01:00
Conrad Irwin
04fc31fc19
Fix another case where we could apply highlights with wrong indices (#50367)
Closes #ISSUE

Release Notes:

- N/A
2026-03-02 09:53:43 -07:00
Bennet Bo Fenner
9ca695d9f6
Remove dbg! from tests (#50506)
Removes a bunch of `dbg!`'s from strings in test code. It's annoying
cause these show up in project search, when you are removing
`dbg!(...)`'s after debugging something

Release Notes:

- N/A
2026-03-02 16:31:20 +00:00
Om Chillure
3630ac9238
Fix renaming with . in JSX tags (#50373)
Fixes #50245

### Summary :
This PR fixes linked tag renaming when typing . in tag names like
<Table.Headers>...</Table.Headers>.

Previously, linked editing treated . as punctuation (unless a language
explicitly configured it as a linked-edit character), so renaming could
stop syncing at the dot and produce mismatched closing tags.

### What changed
Updated linked-edit input handling to preserve linked edits when the
typed input is exactly ".", even if the active language does not
explicitly include dot in linked_edit_characters.
Added a regression test covering dot typing in linked edits without
language override.

Kept existing punctuation behavior (e.g. >) unchanged.

### Files changed
[editor.rs]
[editor_tests.rs]

### Why this approach
Minimal, targeted fix in shared linked-edit path.
Works for .svelte and similar markup contexts where dot-separated
component names are valid in practice.
Avoids requiring every language/extension to add dot config
individually.

### Validation
Manual repro confirmed: opening tag rename with dot now keeps closing
tag synced.
Added test: test_linked_edits_on_typing_dot_without_language_override.
Existing related test remains relevant:
test_linked_edits_on_typing_punctuation.
2026-03-02 11:24:39 -05:00
KyleBarton
0214d6e78b
Adjust scroll top by number of sticky headers (#50359)
In cases where sticky headers are enabled, count the number of sticky
headers that would be present when performing `editor:scroll cursor
top`. Take the maximum of that number and `verical_scroll_margin` so
that we don't inadvertently bury the cursor behind the sticky headers.



https://github.com/user-attachments/assets/6d49fe3a-2017-4c76-bd92-c4ec9794f898



Closes #48864

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:

- Fixed scroll top behavior when there are more sticky headers than
vertical_scroll_margin
2026-03-02 08:09:13 -08:00
Lukas Wirth
065d85d850
editor: Do treesitter bracket colorization work on the background (#50068)
This is pure computation work that is disconnected from main thread
entity state yet it can still block for a couple milliseconds depending
on the file

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-03-02 15:15:08 +00:00
Cole Miller
c0008cf0f8
editor: Fix edit prediction popovers painting outside the editor's bounds (#50361)
Deferred draws previously didn't use a content mask, so you could
horizontally scroll an EP popover all the way out of the containing
pane.

This also affects other UI elements that use the deferred draw system; I
think in practice it doesn't make much difference because most of those
seem to require something in the editor to be hovered, so if you scroll
horizontally the element goes away.

Release Notes:

- Fixed being able to scroll the edit prediction popover out of the
containing pane.
2026-03-02 13:38:50 +00:00
Lukas Wirth
c05e5859c6
Detect leaked entities at the end of test runs (#50400)
This does not yet allow for finding task <-> entity cycles
unfortunately, but at least it does catch entity <-> entity cycles for
the time being

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-03-02 12:04:13 +01:00
Lukas Wirth
7cff4b0998
editor: Clean up tab_map (#49606)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-03-02 09:24:04 +00:00
Lukas Wirth
da499966d2
editor: Fix sticky diff hunk controls not being flush to buffer headers (#50402)
Release Notes:

- Fixed a visual gap between diff hunk controls and buffer headers
2026-03-02 09:23:08 +01:00
Lukas Wirth
746ecb082d
buffer_diff: Do not block on parsing in set_snapshot_with_secondary_inner (#50385)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-02-28 11:53:06 +00:00
Lukas Wirth
5a40e687e5
editor: Fix a bunch of inlay hint bugs (#50377)
Release Notes:

- Fixed multiple language servers applying to the same buffer
overwriting each others inlay hints
- Fixed multiple language servers applying to the same multibuffer
discarding each others inlay hints
- Fixed a bug that caused some inlay hints to sometimes duplicate
2026-02-28 09:44:36 +00:00
Wuji Chen
96abd034a9
Fix Cmd+click navigating to file instead of definition (#49012)
## Summary

- Tighten `link_pattern_file_candidates` regex from `\(([^)]*)\)` to
`]\(([^)]*)\)` so only Markdown link syntax `[title](path)` triggers
path extraction from parentheses
- Prevents function call arguments like `do_work(file2)` from being
incorrectly resolved as file paths, which preempted LSP go-to-definition

Closes #48938

## Test plan

- [x] `cargo test -p editor hover_links` — all 12 tests pass
- [x] New unit tests verify: function calls don't extract arguments as
file candidates; Markdown links still extract correctly

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Release Notes:

- Fixed Cmd+click navigating to file instead of definition in certain
cases

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 12:28:34 +01:00
Cole Miller
be5763632d
Start removing callers of legacy excerpt APIs (#50144)
Paving the way to remove `ExcerptId`. Done in this PR:

- Unshipped the stack trace view
- Get rid of `push_excerpts`
- Get rid of some callers of `remove_excerpts`

We still need to remove some calls to `remove_excerpts` and other APIs,
especially in `randomly_edit_excerpts` and collaboration.

Release Notes:

- The stack trace multibuffer view has been removed.

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2026-02-26 10:37:43 -05:00
Cole Miller
1ad9d59dc9
git: Fix a panic when searching the split diff (#50211)
This could happen when you initiated a search on the left side, then
toggled into the unified view, then tried to select the next match.

Closes ZED-55G

Release Notes:

- Fixed a panic when toggling the split diff view while searching.
2026-02-26 14:22:08 +00:00
Josh Robson Chase
b6a2283f01
editor: Fix JoinLines with selection to end-of-line (#48035)
Full line selections should only include the next line if there's a
single line selected. Otherwise, if multiple lines are selected, only
the selected lines should be joined.

Also updates the editor tests to include both of these cases.

Closes #48030 

Release Notes:

- Fixed `editor::JoinLines` when a multi-line selection includes the end
of the final line
2026-02-26 14:45:10 +01:00
Cameron Mcloughlin
10bbcdfec5
Side by side diff spacer polish (#50182)
Co-authored-by: Cole Miller <cole@zed.dev>
2026-02-26 10:47:10 +00:00
Conrad Irwin
845328662d
Fix panic in diff hunk rendering (#50163)
When `row_infos.is_empty()` (if you have very very tiny editors) we
could
end up trying to read the first item out of it.

Fixes ZED-5AT
Fixes ZED-54F
Fixes ZED-56N

Updates  #49260

cc @Veykril

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

Release Notes:

- Fixed a panic rendering diff hunk headers in 0-height editors
2026-02-26 05:34:58 +00:00
Lukas Wirth
ca066cbefd
Replace some hot TreeMaps with Arc<HashMap> (#49984)
These tend to be very often mutated while we don't really need the
subtree sharing of TreeMaps, so replacing them here is generally
cheaper.

Release Notes:

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

Co-authored by: John Tur <jtur@zed.dev>
2026-02-25 09:10:29 +01:00