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 | | --- | --- | |  |  | Release Notes: - N/A
This commit is contained in:
parent
e6f51966a1
commit
6363fdab88
3 changed files with 26 additions and 4 deletions
|
@ -107,6 +107,7 @@ impl MessageEditor {
|
|||
let this = cx.entity().downgrade();
|
||||
editor.update(cx, |editor, cx| {
|
||||
editor.set_soft_wrap_mode(SoftWrap::EditorWidth, cx);
|
||||
editor.set_offset_content(false, cx);
|
||||
editor.set_use_autoclose(false);
|
||||
editor.set_show_gutter(false, cx);
|
||||
editor.set_show_wrap_guides(false, cx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue