aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--view.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/view.c b/view.c
index 2b06286..4ae4b87 100644
--- a/view.c
+++ b/view.c
@@ -1428,6 +1428,10 @@ void view_style(View *view, enum UiStyle style_id, size_t start, size_t end) {
while (pos < start && col < width)
pos += line->cells[col++].len;
+ /* skip empty columns */
+ while (!line->cells[col].len && col < width)
+ col++;
+
do {
while (pos <= end && col < width) {
pos += line->cells[col].len;