zed/crates/editor
zed-zippy[bot] 9cd276236e
Some checks are pending
run_tests / orchestrate (push) Waiting to run
run_tests / check_style (push) Waiting to run
run_tests / clippy_windows (push) Blocked by required conditions
run_tests / clippy_linux (push) Blocked by required conditions
run_tests / clippy_mac (push) Blocked by required conditions
run_tests / clippy_mac_x86_64 (push) Blocked by required conditions
run_tests / run_tests_windows (push) Blocked by required conditions
run_tests / run_tests_linux (push) Blocked by required conditions
run_tests / run_tests_mac (push) Blocked by required conditions
run_tests / doctests (push) Blocked by required conditions
run_tests / check_workspace_binaries (push) Blocked by required conditions
run_tests / build_visual_tests_binary (push) Blocked by required conditions
run_tests / check_wasm (push) Blocked by required conditions
run_tests / check_dependencies (push) Blocked by required conditions
run_tests / check_postgres_and_protobuf_migrations (push) Blocked by required conditions
run_tests / extension_tests (push) Blocked by required conditions
run_tests / check_docs (push) Blocked by required conditions
run_tests / check_licenses (push) Blocked by required conditions
run_tests / check_scripts (push) Blocked by required conditions
run_tests / tests_pass (push) Blocked by required conditions
Clip flex editor blocks to the text viewport (#56549) (cherry-pick to preview) (#56574)
Cherry-pick of #56549 to preview

----
Resolves https://github.com/zed-industries/zed/issues/56518

This diff fixes code lens decorations continuing to paint into the
gutter when the editor is horizontally
scrolled. Code lens entries were rendered as flex editor blocks with
explicit gutter padding, which allowed
them to bypass the text viewport clipping used by content-only blocks.

With this change, code lens entries render as spacer-style custom blocks
instead. Spacer blocks already
scroll with buffer content and paint through the text-side mask, so the
code lens padding can be relative to
the editor text area and decorations clip at the left edge of the
viewport.

| Before | After |
| --- | --- |
| <video

src="https://github.com/user-attachments/assets/dc567ce5-ad04-4ba2-9156-ec4ec087bd41"
controls width="320"></video> | <video

src="https://github.com/user-attachments/assets/abb5ba2c-981f-4399-903b-0f8fa9a560e4"
controls width="320"></video> |

Release Notes:
- Fixed code lens decorations painting outside the editor viewport when
horizontally scrolling.

Co-authored-by: liam <liam@scalzulli.com>
2026-05-12 20:28:30 +00:00
..
benches theme: Split out theme_settings crate (#52569) 2026-03-27 14:41:25 +01:00
src Clip flex editor blocks to the text viewport (#56549) (cherry-pick to preview) (#56574) 2026-05-12 20:28:30 +00:00
Cargo.toml editor: Add base64 encode/decode commands (#55361) 2026-05-05 04:36:18 +00:00
LICENSE-GPL