mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-11 21:00:35 +00:00
Re-focus diagnostics editor when transitioning from an empty to a populated state
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
parent
1875a0e349
commit
571d0386e2
1 changed files with 8 additions and 2 deletions
|
@ -389,9 +389,15 @@ impl ProjectDiagnosticsEditor {
|
||||||
self.path_states.remove(path_ix);
|
self.path_states.remove(path_ix);
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.editor.is_focused(cx) && self.path_states.is_empty() {
|
if self.path_states.is_empty() {
|
||||||
|
if self.editor.is_focused(cx) {
|
||||||
cx.focus_self();
|
cx.focus_self();
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if cx.handle().is_focused(cx) {
|
||||||
|
cx.focus(&self.editor);
|
||||||
|
}
|
||||||
|
}
|
||||||
cx.notify();
|
cx.notify();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue