zed icon indicating copy to clipboard operation
zed copied to clipboard

editor: Do not offset text in single line editors by default

Open MrSubidubi opened this issue 7 months ago • 1 comments

Follow-up to #30138

In the linked PR, I enabled the content offset for all editors by default. However, this introduced a small regression: There are some editors where we do not want the text to be offset, most notably the rename and the filename editor.

This PR adds a method to disable the content offset for specific editors. I specifically decided on an opt-out approach, since I think that having the small offset for most editors is actually a benefit instead of a disadvantage. However, open to change that or to disable the offset for all editors but full mode editors by default if that should be preferred.

main This PR
main pr

Release Notes:

  • N/A

MrSubidubi avatar May 12 '25 20:05 MrSubidubi

I changed the behavior slightly so that the text is not offset by default in single line editors, since I found more places where this led to slight layouting issues and misalignments. Seems slightly more reasonable and less intrusive. Let me know what you think, in any case sorry for the introduction of this regression.

MrSubidubi avatar May 13 '25 11:05 MrSubidubi