ZIm/crates/editor
Daniel Sauble 4ee52433ae
Do not subtract gutter margin twice from the editor width (#34564)
Closes #33176

In auto-height layouts, horizontal autoscroll can occur right before
soft wrapping is triggered. This seems to be caused by gutter margin
being subtracted twice from the editor width.

If we subtract gutter width only once, the horizontal autoscroll
behavior goes away.

Before:


https://github.com/user-attachments/assets/03b6687e-3c0e-4b34-8e07-a228bcc6f798

After:


https://github.com/user-attachments/assets/84e54088-b5bd-4259-a193-d9fcf32cd3a7

Release Notes:

- Fixes issue with auto-height layouts where horizontal autoscroll is
triggered right before text wraps

---------

Co-authored-by: MrSubidubi <finn@zed.dev>
2025-07-25 00:00:59 +00:00
..
src Do not subtract gutter margin twice from the editor width (#34564) 2025-07-25 00:00:59 +00:00
Cargo.toml Fix yaml comment indent (#33882) 2025-07-03 23:57:57 +00:00
LICENSE-GPL chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00