summaryrefslogtreecommitdiff
path: root/src/libvterm
diff options
context:
space:
mode:
Diffstat (limited to 'src/libvterm')
-rw-r--r--src/libvterm/src/state.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libvterm/src/state.c b/src/libvterm/src/state.c
index 390aa8dce..afb188c7e 100644
--- a/src/libvterm/src/state.c
+++ b/src/libvterm/src/state.c
@@ -384,7 +384,8 @@ static int on_text(const char bytes[], size_t len, void *user)
abort();
}
#endif
- width += this_width;
+ if (i == glyph_starts || this_width > width)
+ width = this_width;
}
chars[glyph_ends - glyph_starts] = 0;