afrim
afrim copied to clipboard
Provide a way to clear the `cursor` of the preprocessor
Description
Currently, there is no proper way to clear the cursor
of preprocessor externally.
And to bypass it, I use the following code.
preprocessor.process(/* KeyEvent to trigger the internal clean */)
// or
self.preprocessor.commit("".to_owned());
self.preprocessor.clear_queue();
This code require knowing the internally working who is not good since it can change in the future.
Expected solution
Have a method to clear the preprocessor cursor.
pub fn clear_cursor(&mut self) {
self.cursor.clear();
}