Simulate calling of text-insertion APIs in TestAppContext::dispatch_keystroke

This commit is contained in:
Max Brunsfeld 2022-07-25 12:20:12 -07:00
parent a54d9f1697
commit ab037fe844
3 changed files with 30 additions and 19 deletions

View file

@ -165,12 +165,6 @@ impl<'a> EditorTestContext<'a> {
})
}
pub fn simulate_input(&mut self, input: &str) {
self.editor.update(self.cx, |editor, cx| {
editor.handle_input(input, cx);
});
}
pub fn update_buffer<F, T>(&mut self, update: F) -> T
where
F: FnOnce(&mut Buffer, &mut ModelContext<Buffer>) -> T,