Remove unused {cancel,finish}_composition methods

This commit is contained in:
Antonio Scandurra 2022-07-21 13:48:56 +02:00
parent 481078ae22
commit a4ceae3cf2
3 changed files with 1 additions and 15 deletions

View File

@ -445,18 +445,6 @@ impl InputHandler for WindowInputHandler {
);
});
}
// TODO - do these need to be handled separately?
fn cancel_composition(&mut self) {
println!("cancel_composition()");
self.unmark_text();
}
fn finish_composition(&mut self) {
println!("finish_composition()");
self.unmark_text();
}
}
#[cfg(any(test, feature = "test-support"))]

View File

@ -102,8 +102,6 @@ pub trait InputHandler {
);
fn marked_text_range(&self) -> Option<Range<usize>>;
fn unmark_text(&mut self);
fn cancel_composition(&mut self);
fn finish_composition(&mut self);
}
pub trait Window: WindowContext {

View File

@ -1097,7 +1097,7 @@ extern "C" fn set_marked_text(
}
extern "C" fn unmark_text(this: &Object, _: Sel) {
with_input_handler(this, |input_handler| input_handler.finish_composition());
with_input_handler(this, |input_handler| input_handler.unmark_text());
}
extern "C" fn attributed_substring_for_proposed_range(