Expose tab width calculation

This commit is contained in:
Joscha 2022-07-07 16:21:05 +02:00
parent f0af4ddc40
commit d693712dab

View file

@ -67,6 +67,10 @@ impl Frame {
self.widthdb.width(s)
}
pub fn tab_width_at_column(&self, col: usize) -> u8 {
wrap::tab_width_at_column(self.tab_width, col)
}
pub fn wrap(&mut self, text: &str, width: usize) -> Vec<usize> {
wrap::wrap(&mut self.widthdb, self.tab_width, text, width)
}