In diagnostics editor, attempt to open excerpts in a different pane
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
747d9e8784
commit
a0a558318c
2 changed files with 13 additions and 1 deletions
|
@ -192,7 +192,9 @@ impl ProjectDiagnosticsEditor {
|
|||
workspace.update(cx, |workspace, cx| {
|
||||
for (buffer, ranges) in new_selections_by_buffer {
|
||||
let buffer = BufferItemHandle(buffer);
|
||||
workspace.activate_pane_for_item(&buffer, cx);
|
||||
if !workspace.activate_pane_for_item(&buffer, cx) {
|
||||
workspace.activate_next_pane(cx);
|
||||
}
|
||||
let editor = workspace
|
||||
.open_item(buffer, cx)
|
||||
.to_any()
|
||||
|
@ -561,6 +563,10 @@ impl workspace::ItemView for ProjectDiagnosticsEditor {
|
|||
unreachable!()
|
||||
}
|
||||
|
||||
fn should_activate_item_on_event(event: &Self::Event) -> bool {
|
||||
Editor::should_activate_item_on_event(event)
|
||||
}
|
||||
|
||||
fn should_update_tab_on_event(event: &Event) -> bool {
|
||||
matches!(
|
||||
event,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue