mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-27 02:48:34 +00:00
Dismiss outline view when the query editor is blurred
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
b52db22544
commit
e4c0fc6ad5
2 changed files with 1 additions and 2 deletions
|
@ -224,6 +224,4 @@ impl View for GoToLine {
|
||||||
fn on_focus(&mut self, cx: &mut ViewContext<Self>) {
|
fn on_focus(&mut self, cx: &mut ViewContext<Self>) {
|
||||||
cx.focus(&self.line_editor);
|
cx.focus(&self.line_editor);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn on_blur(&mut self, _: &mut ViewContext<Self>) {}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -258,6 +258,7 @@ impl OutlineView {
|
||||||
cx: &mut ViewContext<Self>,
|
cx: &mut ViewContext<Self>,
|
||||||
) {
|
) {
|
||||||
match event {
|
match event {
|
||||||
|
editor::Event::Blurred => cx.emit(Event::Dismissed),
|
||||||
editor::Event::Edited => self.update_matches(cx),
|
editor::Event::Edited => self.update_matches(cx),
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue