Editor: make delete_range and insert_at methods public
This commit is contained in:
parent
afc5b525f1
commit
de6f2c7fbe
4 changed files with 93 additions and 81 deletions
|
|
@ -294,6 +294,14 @@ impl<'a> Edit for ViEditor<'a> {
|
|||
self.editor.shape_as_needed(font_system);
|
||||
}
|
||||
|
||||
fn delete_range(&mut self, start: Cursor, end: Cursor) {
|
||||
self.editor.delete_range(start, end);
|
||||
}
|
||||
|
||||
fn insert_at(&mut self, cursor: Cursor, data: &str, attrs_list: Option<AttrsList>) -> Cursor {
|
||||
self.editor.insert_at(cursor, data, attrs_list)
|
||||
}
|
||||
|
||||
fn copy_selection(&self) -> Option<String> {
|
||||
self.editor.copy_selection()
|
||||
}
|
||||
|
|
@ -302,10 +310,6 @@ impl<'a> Edit for ViEditor<'a> {
|
|||
self.editor.delete_selection()
|
||||
}
|
||||
|
||||
fn insert_string(&mut self, data: &str, attrs_list: Option<AttrsList>) {
|
||||
self.editor.insert_string(data, attrs_list);
|
||||
}
|
||||
|
||||
fn apply_change(&mut self, change: &Change) -> bool {
|
||||
self.editor.apply_change(change)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue