Increase diagnostic editor's vertical scroll margin
This way, the first path header will always be fully visible when you move your cursor to the beginning of the multibuffer.
This commit is contained in:
parent
9b9fcf6927
commit
76bbd101c6
2 changed files with 13 additions and 3 deletions
|
@ -146,8 +146,11 @@ impl ProjectDiagnosticsEditor {
|
|||
|
||||
let excerpts = cx.add_model(|cx| MultiBuffer::new(project.read(cx).replica_id()));
|
||||
let build_settings = editor::settings_builder(excerpts.downgrade(), settings.clone());
|
||||
let editor =
|
||||
cx.add_view(|cx| Editor::for_buffer(excerpts.clone(), build_settings.clone(), cx));
|
||||
let editor = cx.add_view(|cx| {
|
||||
let mut editor = Editor::for_buffer(excerpts.clone(), build_settings.clone(), cx);
|
||||
editor.set_vertical_scroll_margin(5, cx);
|
||||
editor
|
||||
});
|
||||
cx.subscribe(&editor, |_, _, event, cx| cx.emit(*event))
|
||||
.detach();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue