editor: Wrap placeholder if text overflows (#37919)
This fixes an issue where long placeholders would be cut off, e.g. in a Claude Code thread: <img width="387" height="115" alt="image" src="https://github.com/user-attachments/assets/831a54aa-cf2b-4d87-af86-e368a5936f6b" /> Now: <img width="354" height="115" alt="image" src="https://github.com/user-attachments/assets/e5df5e05-0869-4db2-8dee-38611263191c" /> Most of the changes in this PR are caused by us requiring `&mut Window` in `set_placeholder_text`. Release Notes: - Fixed an issue where placeholders inside editors would not wrap --------- Co-authored-by: Agus Zubiaga <agus@zed.dev>
This commit is contained in:
co-authored by
Agus Zubiaga
parent
fb3c991112
commit
acb3406eb8
@@ -55,7 +55,7 @@ impl SingleLineInput {
|
||||
|
||||
let editor = cx.new(|cx| {
|
||||
let mut input = Editor::single_line(window, cx);
|
||||
input.set_placeholder_text(placeholder_text.clone(), cx);
|
||||
input.set_placeholder_text(&placeholder_text, window, cx);
|
||||
input
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user