Add Editor::for_multibuffer
and repurpose Editor::for_buffer
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
44d997c00c
commit
6f9c37851c
5 changed files with 27 additions and 26 deletions
|
@ -113,7 +113,8 @@ impl ProjectDiagnosticsEditor {
|
|||
|
||||
let excerpts = cx.add_model(|cx| MultiBuffer::new(project_handle.read(cx).replica_id()));
|
||||
let editor = cx.add_view(|cx| {
|
||||
let mut editor = Editor::for_buffer(excerpts.clone(), Some(project_handle.clone()), cx);
|
||||
let mut editor =
|
||||
Editor::for_multibuffer(excerpts.clone(), Some(project_handle.clone()), cx);
|
||||
editor.set_vertical_scroll_margin(5, cx);
|
||||
editor
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue