Expose some Rope functions through TextBuffer
This is mostly just to silence unused code warnings for now.
This commit is contained in:
parent
0ae501d150
commit
529ac555ec
|
|
@ -2,6 +2,7 @@ use std::rc::Rc;
|
|||
|
||||
mod rope;
|
||||
use rope::Rope;
|
||||
pub use rope::{CharIterator, CharWithPointIterator};
|
||||
|
||||
pub struct TextBuffer {
|
||||
contents: Rc<Rope>,
|
||||
|
|
@ -53,6 +54,18 @@ impl TextBuffer {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn delete_at_char_index(&mut self, start: usize, length: usize) {
|
||||
self.contents = self.contents.delete_at_char_index(start, length)
|
||||
}
|
||||
|
||||
pub fn iter_chars(&self) -> CharIterator {
|
||||
self.contents.iter_chars()
|
||||
}
|
||||
|
||||
pub fn iter_chars_with_point(&self) -> CharWithPointIterator {
|
||||
self.contents.iter_chars_with_point()
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for TextBuffer {
|
||||
|
|
|
|||
Loading…
Reference in New Issue