Store an AnyWindowHandle in WindowContext
This commit is contained in:
parent
49f1f1c6c2
commit
d896d89842
19 changed files with 526 additions and 559 deletions
|
@ -135,16 +135,14 @@ impl Entity for GoToLine {
|
|||
|
||||
fn release(&mut self, cx: &mut AppContext) {
|
||||
let scroll_position = self.prev_scroll_position.take();
|
||||
if let Some(window) = self.active_editor.window(cx) {
|
||||
window.update(cx, |cx| {
|
||||
self.active_editor.update(cx, |editor, cx| {
|
||||
editor.highlight_rows(None);
|
||||
if let Some(scroll_position) = scroll_position {
|
||||
editor.set_scroll_position(scroll_position, cx);
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
self.active_editor.window().update(cx, |cx| {
|
||||
self.active_editor.update(cx, |editor, cx| {
|
||||
editor.highlight_rows(None);
|
||||
if let Some(scroll_position) = scroll_position {
|
||||
editor.set_scroll_position(scroll_position, cx);
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue