# editor: Do not offset text in single line editors by default \(\#30599\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/6363fdab8871ff87a5143fadf26915a2c1e17145)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 6363fdab8871ff87a5143fadf26915a2c1e17145

Requested commit: 6363fdab8871ff87a5143fadf26915a2c1e17145

Commit: 6363fdab8871ff87a5143fadf26915a2c1e17145

Tree: 6c11e7ecf2021f8a022d7dfa1ec8fae1e76808f1

Author: Finn Evers

Committer: GitHub

## Message

```
editor: Do not offset text in single line editors by default (#30599)

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](https://github.com/user-attachments/assets/a7e9249e-ac5c-422f-9f30-021ebf21850b)
|
![pr](https://github.com/user-attachments/assets/c5eef4e6-fad8-46ab-9f2d-d0ebdca01e2c)
|


Release Notes:

- N/A
```

## Parents

- [e6f51966a1ca11bdbf789e658de202c90c938bfb](https://git.cafe/gitcafe/zed/commit/e6f51966a1ca11bdbf789e658de202c90c938bfb?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/6363fdab8871ff87a5143fadf26915a2c1e17145?format=markdown)
