From 3b2a2105fe73007e98c9f27f60eab6ab1b76f82a Mon Sep 17 00:00:00 2001 From: Joscha Date: Thu, 4 Aug 2022 02:02:58 +0200 Subject: [PATCH] Fix incorrect width for tab-replacing spaces --- src/buffer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/buffer.rs b/src/buffer.rs index 9345e8c..ca95782 100644 --- a/src/buffer.rs +++ b/src/buffer.rs @@ -351,7 +351,7 @@ impl Buffer { col += width as usize; if g == "\t" { for dx in 0..width { - self.write_grapheme(&xrange, x + dx as i32, y, width, " ", style); + self.write_grapheme(&xrange, x + dx as i32, y, 1, " ", style); } } else if width > 0 { self.write_grapheme(&xrange, x, y, width, g, style);