Simulate calling of text-insertion APIs in TestAppContext::dispatch_keystroke
This commit is contained in:
parent
a54d9f1697
commit
ab037fe844
3 changed files with 30 additions and 19 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue