fb19db00ca15085a3363ce21dbe2e5cfa68dc687
When selecting text, it highlights all matching occurences along with selected text itself. This causes highlight overlap, which looks bit odd. This PR fixes it. Bonus: Context: We have an edge case (which we already cover) where we don’t want to clear `SelectedTextHighlight` every time the selection changes. This happens when you are dragging the selection across some word, if you clear it directly on selection change, due to debounce wait, the highlight take some time to appear, which causes flickering for the user. We solve this by not clearing it directly but only clearing it when a new selection is found. This avoids the flicker. However, we also need to clear the selection even before the debounce wait if we detect early on that the selection is different from previous ones. Otherwise, the user will have to wait until the debounce time to see it cleared on the screen. The code for this is a little repetitive because we check the buffer state both before and after the debounce. But this is necessary. --- Before: Notice overlapping corners and selected text is bit darker in this case.  After:  Release Notes: - N/A
editor: Do not highlight selected text + Clear highlight preemptively when new selection is detected (#25149)
Zed
Welcome to Zed, a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Installation
On macOS and Linux you can download Zed directly or install Zed via your local package manager.
Other platforms are not yet available:
- Windows (tracking issue)
- 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%