aboutsummaryrefslogtreecommitdiff
path: root/tty.c
diff options
context:
space:
mode:
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/tty.c b/tty.c
index 9ddffb95..ee725edf 100644
--- a/tty.c
+++ b/tty.c
@@ -342,7 +342,7 @@ tty_putc(struct tty *tty, u_char ch)
void
tty_pututf8(struct tty *tty, const struct grid_utf8 *gu)
{
- u_int i, width;
+ u_int i;
for (i = 0; i < UTF8_SIZE; i++) {
if (gu->data[i] == 0xff)
@@ -352,8 +352,7 @@ tty_pututf8(struct tty *tty, const struct grid_utf8 *gu)
write(tty->log_fd, &gu->data[i], 1);
}
- width = utf8_width(gu->data);
- tty->cx += width;
+ tty->cx += gu->width;
}
void