editor: Keep deleted gutter markers visible at narrow widths (#64469)
Closes #62923
# Objective
Deleted Git gutter markers collapse into a lens and disappear when the
configured gutter width is narrow relative to the buffer line height.
## Solution
- Clamp the deleted marker's corner radii to the marker quad.
- Keep the existing proportional width calculation for default and
custom gutter widths.
- Restore the width helper and its unit test to their behavior on
`main`.
## Testing
- `cargo build -p zed` passes on macOS with Apple's Metal Toolchain
installed.
- `git diff --check` passes.
- Checked before and after at default width, custom width 1, and custom
width 3 with 15 px and 19 px buffer fonts.
- The deleted marker remains full line height in all six patched cases.
The green added-line strip still follows the configured gutter width.
## Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks, if any, have justifying comments
- [x] The content adheres to Zed's UI standards
- [x] Tests cover the new behavior
- [x] Performance impact has been considered and is acceptable
## Showcase
Before/after comparison: see the latest visual verification in the PR
conversation.
## AI assistance
Codex helped trace the paint geometry, prepare the focused patch, and
assemble the visual comparison. I reviewed the diff and the rendered
results before submission.
---
Release Notes:
- Fixed deleted Git gutter markers disappearing at narrow custom widths.
---------
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
189839eef5Rajin Khan committed on 9/22/2026, 1:19:32 PM· committed by GitHubparent62e5991