Apply more fixes to the visual part

This commit is contained in:
Kirill Bulatov
2023-12-20 18:23:08 +02:00
parent 676a07270e
commit 75074c3297
5 changed files with 335 additions and 429 deletions
+5 -8
View File
@@ -1652,14 +1652,11 @@ impl Editor {
Self::new(EditorMode::SingleLine, buffer, None, cx)
}
// pub fn multi_line(
// field_editor_style: Option<Arc<GetFieldEditorTheme>>,
// cx: &mut ViewContext<Self>,
// ) -> Self {
// let buffer = cx.build_model(|cx| Buffer::new(0, cx.model_id() as u64, String::new()));
// let buffer = cx.build_model(|cx| MultiBuffer::singleton(buffer, cx));
// Self::new(EditorMode::Full, buffer, None, field_editor_style, cx)
// }
pub fn multi_line(cx: &mut ViewContext<Self>) -> Self {
let buffer = cx.build_model(|cx| Buffer::new(0, cx.entity_id().as_u64(), String::new()));
let buffer = cx.build_model(|cx| MultiBuffer::singleton(buffer, cx));
Self::new(EditorMode::Full, buffer, None, cx)
}
pub fn auto_height(max_lines: usize, cx: &mut ViewContext<Self>) -> Self {
let buffer = cx.build_model(|cx| Buffer::new(0, cx.entity_id().as_u64(), String::new()));