Remove auto-width editor type (#34438)
Closes #34044 `EditorMode::SingleLine { auto_width: true }` was only used for the title editor in the rules library, and following https://github.com/zed-industries/zed/pull/31994 we can replace that with a normal single-line editor without problems. The auto-width editor was interacting badly with the recently-added newline visualization code, causing a panic during layout---by switching it to `Editor::single_line` the newline visualization works there too. Release Notes: - Fixed a panic that could occur when opening the rules library. --------- Co-authored-by: Finn <finn@zed.dev>
This commit is contained in:
parent
f9561da673
commit
3ecdfc9b5a
3 changed files with 9 additions and 62 deletions
|
@ -611,7 +611,7 @@ impl RulesLibrary {
|
|||
this.update_in(cx, |this, window, cx| match rule {
|
||||
Ok(rule) => {
|
||||
let title_editor = cx.new(|cx| {
|
||||
let mut editor = Editor::auto_width(window, cx);
|
||||
let mut editor = Editor::single_line(window, cx);
|
||||
editor.set_placeholder_text("Untitled", cx);
|
||||
editor.set_text(rule_metadata.title.unwrap_or_default(), window, cx);
|
||||
if prompt_id.is_built_in() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue