Diff options
Diffstat (limited to '')
-rw-r--r--source/ui-blame.c5
1 file changed, 3 insertions, 2 deletions
diff --git a/source/ui-blame.c b/source/ui-blame.c
index 5c8dbd6..2e281cf 100644
--- a/source/ui-blame.c
+++ b/source/ui-blame.c
@@ -198,9 +198,10 @@ static size_t line_width(struct blame_scoreboard *sb, int line)
pos += len;
continue;
}
- width++;
if (*pos++ == '\t')
- width = (width + TAB_WIDTH - 1) & ~(TAB_WIDTH - 1);
+ width += TAB_WIDTH - width % TAB_WIDTH;
+ else
+ width++;
}
return width;
}