From d693712dab61d806c3ac36083d27016e67794154 Mon Sep 17 00:00:00 2001 From: Joscha Date: Thu, 7 Jul 2022 16:21:05 +0200 Subject: [PATCH] Expose tab width calculation --- src/frame.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/frame.rs b/src/frame.rs index 2ef1b51..7df7928 100644 --- a/src/frame.rs +++ b/src/frame.rs @@ -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 { wrap::wrap(&mut self.widthdb, self.tab_width, text, width) }