79be5cbfe21eabeadb2d910d4ba7c355256bd0e3
The bug is in the `place_near` logic, specifically the `!row_block_types.contains_key(&(row - 1))` check. The problem isn’t really that condition itself, but it’s that it relies on `row_block_types`, which does not take into account that upon block resizes, subsequent block start row moves up/down. Since `place_near` depends on this incorrect map, it ends up causing incorrect resize syncs to the block map, which then triggers more bad recursive calls. The reason it worked till now in most of the cases is that recursive resizes eventually lead to stabilizing it. Before `place_near`, we never touched `row_block_types` during the first prepaint pass because we knew it was based on outdated heights. Once all heights are finalized, using it is fine. The fix is to make sure `row_block_types` is accurate from the very first prepaint pass by keeping an offset whenever a block shrinks or expands. Now ideally it should take only one subsequent prepaint. But due to shrinking, new custom/diagnostics blocks might come into the view from below, which needs further prepaint calls for resolving. Right now, tests pass after 2 subsequent prepaint calls. Just to be safe, we have set it to 5. <img width="500" alt="image" src="https://github.com/user-attachments/assets/da3d32ff-5972-46d9-8597-b438e162552b" /> Release Notes: - Fix issue where sometimes Zed used to experience freeze while working with inline diagnostics.
Zed
Welcome to Zed, a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Installation
On macOS, Linux, and Windows you can download Zed directly or install Zed via your local package manager.
Other platforms are not yet available:
- Web (tracking issue)
Developing Zed
- Building Zed for macOS
- Building Zed for Linux
- Building Zed for Windows
- Running Collaboration Locally
Contributing
See CONTRIBUTING.md for ways you can contribute to Zed.
Also... we're hiring! Check out our jobs page for open roles.
Licensing
License information for third party dependencies must be correctly provided for CI to pass.
We use cargo-about to automatically comply with open source licenses. If CI is failing, check the following:
- Is it showing a
no license specifiederror for a crate you've created? If so, addpublish = falseunder[package]in your crate's Cargo.toml. - Is the error
failed to satisfy license requirementsfor a dependency? If so, first determine what license the project has and whether this system is sufficient to comply with this license's requirements. If you're unsure, ask a lawyer. Once you've verified that this system is acceptable add the license's SPDX identifier to theacceptedarray inscript/licenses/zed-licenses.toml. - Is
cargo-aboutunable to find the license for a dependency? If so, add a clarification field at the end ofscript/licenses/zed-licenses.toml, as specified in the cargo-about book.
Description
Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Readme
586 MiB
Languages
Rust
94.7%
JSON-with-Comments
3.1%
Inno Setup
0.6%
Scheme
0.5%
Shell
0.3%
Other
0.4%