editor: Prevent vertical scrollbar from overlapping with buffer headers
Closes #16993
This PR fixes an issue where the vertical editor scrollbar was overlaying with buffer headers. I fixed this by reserving space for the scrollbar as needed which is provided by the recently introduced right_margin.
Most of the diff consists of moving the EditorMargins creation out of render_block, as the right margin is stored in this struct and moving this out reduces the length of the parameter list of render_blocks by one. I thought of this to be a small but nice side effect.
When it comes to the dividers, I decided against these considering the margin as well, since it felt a bit off. However, I can see arguments for these also considering the margins. I did include an image for comparison in the list below. Happy to change this should it be preferred the other way around.
main |
|
|---|---|
| PR | |
| Fix with shortened divider |
Release Notes:
- Ensured that the vertical editor scrollbar no longer overlaps with buffer headers.