aboutsummaryrefslogtreecommitdiff
path: root/screen-write.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2009-04-30 20:54:53 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2009-04-30 20:54:53 +0000
commita6f2d8233569b4dcb6e26935b33b20f796ce958c (patch)
tree67ca804ba7ceaba1a3ece0366f4a02800e96f714 /screen-write.c
parent4a74349ff5c789ea6cc05af5bf8ac25e60abf54a (diff)
downloadrtmux-a6f2d8233569b4dcb6e26935b33b20f796ce958c.tar.gz
rtmux-a6f2d8233569b4dcb6e26935b33b20f796ce958c.tar.bz2
rtmux-a6f2d8233569b4dcb6e26935b33b20f796ce958c.zip
Use a (pre)randomised binary tree for UTF-8 character widths. Probably overkill
but meh.
Diffstat (limited to 'screen-write.c')
-rw-r--r--screen-write.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/screen-write.c b/screen-write.c
index 526c6546..ac9e27fb 100644
--- a/screen-write.c
+++ b/screen-write.c
@@ -1,4 +1,4 @@
-/* $Id: screen-write.c,v 1.43 2009-03-30 20:14:50 nicm Exp $ */
+/* $Id: screen-write.c,v 1.44 2009-04-30 20:54:53 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -529,7 +529,7 @@ screen_write_cell(
struct screen *s = ctx->s;
struct grid *gd = s->grid;
struct grid_utf8 gu, *tmp_gu;
- u_int width, uvalue, xx, i;
+ u_int width, xx, i;
struct grid_cell tmp_gc, *tmp_gc2;
size_t size;
@@ -539,8 +539,7 @@ screen_write_cell(
/* Find character width. */
if (gc->flags & GRID_FLAG_UTF8) {
- uvalue = utf8_combine(udata);
- width = utf8_width(uvalue);
+ width = utf8_width(udata);
gu.width = width;
memcpy(&gu.data, udata, sizeof gu.data);