In-app feedback WIP

This commit is contained in:
Joseph Lyons 2023-01-05 17:58:52 -05:00
parent 3cffee4065
commit 318a0b7ed0
8 changed files with 366 additions and 53 deletions

View file

@ -991,6 +991,15 @@ impl Editor {
Self::new(EditorMode::SingleLine, buffer, None, field_editor_style, cx)
}
pub fn multi_line(
field_editor_style: Option<Arc<GetFieldEditorTheme>>,
cx: &mut ViewContext<Self>,
) -> Self {
let buffer = cx.add_model(|cx| Buffer::new(0, String::new(), cx));
let buffer = cx.add_model(|cx| MultiBuffer::singleton(buffer, cx));
Self::new(EditorMode::Full, buffer, None, field_editor_style, cx)
}
pub fn auto_height(
max_lines: usize,
field_editor_style: Option<Arc<GetFieldEditorTheme>>,