Store an AnyWindowHandle in WindowContext

This commit is contained in:
Nathan Sobo 2023-08-08 11:08:37 -06:00
parent 49f1f1c6c2
commit d896d89842
19 changed files with 526 additions and 559 deletions

View file

@ -85,8 +85,8 @@ impl<'a> VimTestContext<'a> {
}
pub fn set_state(&mut self, text: &str, mode: Mode) -> ContextHandle {
let window_id = self.window.id();
self.update_window(window_id, |cx| {
let window = self.window;
window.update(self.cx.cx.cx, |cx| {
Vim::update(cx, |vim, cx| {
vim.switch_mode(mode, false, cx);
})