editor: Fix panic in text_layout_details pre layout - #55816
Merged
Conversation
…d out Fixes a panic at `Editor::text_layout_details` when called against an editor whose element has never been laid out (i.e., `set_style` has never been called, so the cached `style` is still `None`). We've seen this crash once through a helix motion. The exact production sequence isn't clear — for the editor to receive a vim action without ever having been drawn, the active item would have to have changed inside the same update tick that ends with the deferred `search_submit`, which is narrow but not impossible.
text_layout_details pre layout
benbrandt
approved these changes
May 5, 2026
ebaah46
pushed a commit
to ebaah46/zed
that referenced
this pull request
May 6, 2026
…#55816) Fixes a panic at `Editor::text_layout_details` when called against an editor whose element has never been laid out (i.e., `set_style` has never been called, so the cached `style` is still `None`). We've seen this crash once through a helix motion. The exact production sequence isn't clear — for the editor to receive a vim action without ever having been drawn, the active item would have to have changed inside the same update tick that ends with the deferred `search_submit`, which is narrow but not impossible (since it's dispatched by the workspace, not the editor). Release Notes: - Fixed a rare panic when invoking helix motions on an editor that had not yet been laid out.
Contributor
Author
|
/cherry-pick stable |
zed-zippy Bot
added a commit
that referenced
this pull request
May 7, 2026
…y-pick to stable) (#56062) Cherry-pick of #55816 to stable ---- Fixes a panic at `Editor::text_layout_details` when called against an editor whose element has never been laid out (i.e., `set_style` has never been called, so the cached `style` is still `None`). We've seen this crash once through a helix motion. The exact production sequence isn't clear — for the editor to receive a vim action without ever having been drawn, the active item would have to have changed inside the same update tick that ends with the deferred `search_submit`, which is narrow but not impossible (since it's dispatched by the workspace, not the editor). Release Notes: - Fixed a rare panic when invoking helix motions on an editor that had not yet been laid out. Co-authored-by: Agus Zubiaga <agus@zed.dev>
3 tasks
13 tasks
This was referenced May 11, 2026
Nkr1shna
pushed a commit
to neozed-industries/neo-zed
that referenced
this pull request
May 11, 2026
…#55816) (cherry-pick to stable) (zed-industries#56062) Cherry-pick of zed-industries#55816 to stable ---- Fixes a panic at `Editor::text_layout_details` when called against an editor whose element has never been laid out (i.e., `set_style` has never been called, so the cached `style` is still `None`). We've seen this crash once through a helix motion. The exact production sequence isn't clear — for the editor to receive a vim action without ever having been drawn, the active item would have to have changed inside the same update tick that ends with the deferred `search_submit`, which is narrow but not impossible (since it's dispatched by the workspace, not the editor). Release Notes: - Fixed a rare panic when invoking helix motions on an editor that had not yet been laid out. Co-authored-by: Agus Zubiaga <agus@zed.dev>
Nkr1shna
pushed a commit
to neozed-industries/neo-zed
that referenced
this pull request
May 13, 2026
…#55816) (cherry-pick to stable) (zed-industries#56062) Cherry-pick of zed-industries#55816 to stable ---- Fixes a panic at `Editor::text_layout_details` when called against an editor whose element has never been laid out (i.e., `set_style` has never been called, so the cached `style` is still `None`). We've seen this crash once through a helix motion. The exact production sequence isn't clear — for the editor to receive a vim action without ever having been drawn, the active item would have to have changed inside the same update tick that ends with the deferred `search_submit`, which is narrow but not impossible (since it's dispatched by the workspace, not the editor). Release Notes: - Fixed a rare panic when invoking helix motions on an editor that had not yet been laid out. Co-authored-by: Agus Zubiaga <agus@zed.dev>
This was referenced May 14, 2026
jonx
pushed a commit
to jonx/zed-aros
that referenced
this pull request
Jul 17, 2026
…#55816) Fixes a panic at `Editor::text_layout_details` when called against an editor whose element has never been laid out (i.e., `set_style` has never been called, so the cached `style` is still `None`). We've seen this crash once through a helix motion. The exact production sequence isn't clear — for the editor to receive a vim action without ever having been drawn, the active item would have to have changed inside the same update tick that ends with the deferred `search_submit`, which is narrow but not impossible (since it's dispatched by the workspace, not the editor). Release Notes: - Fixed a rare panic when invoking helix motions on an editor that had not yet been laid out.
jolutz
pushed a commit
to jolutz/zed
that referenced
this pull request
Aug 8, 2026
…#55816) Fixes a panic at `Editor::text_layout_details` when called against an editor whose element has never been laid out (i.e., `set_style` has never been called, so the cached `style` is still `None`). We've seen this crash once through a helix motion. The exact production sequence isn't clear — for the editor to receive a vim action without ever having been drawn, the active item would have to have changed inside the same update tick that ends with the deferred `search_submit`, which is narrow but not impossible (since it's dispatched by the workspace, not the editor). Release Notes: - Fixed a rare panic when invoking helix motions on an editor that had not yet been laid out.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes a panic at
Editor::text_layout_detailswhen called against an editor whose element has never been laid out (i.e.,set_stylehas never been called, so the cachedstyleis stillNone).We've seen this crash once through a helix motion. The exact production sequence isn't clear — for the editor to receive a vim action without ever having been drawn, the active item would have to have changed inside the same update tick that ends with the deferred
search_submit, which is narrow but not impossible (since it's dispatched by the workspace, not the editor).Release Notes: