summaryrefslogtreecommitdiffstats
path: root/cmd-list-windows.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2009-03-28 20:17:29 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2009-03-28 20:17:29 +0000
commitcf7b384c43b4a2c5a1bde8b4f6bfeee20ecad027 (patch)
treef6fbcd72b5cfcd5b3579113c37cfd99efc5a0863 /cmd-list-windows.c
parent34dd72f0089537032429c88226ae66d4a5980575 (diff)
Better UTF-8 support, including combined characters. Unicode data is now stored
as UTF-8 in a separate array, the code does a lookup into this every time it gets to a UTF-8 cell. Zero width characters are just appended onto the UTF-8 data for the previous cell. This also means that almost no bytes extra are wasted non-Unicode data (yay). Still some oddities, such as copy mode skips over wide characters in a strange way, and the code could do with some tidying.
Diffstat (limited to 'cmd-list-windows.c')
-rw-r--r--cmd-list-windows.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd-list-windows.c b/cmd-list-windows.c
index eaf34ba8..9cfc255a 100644
--- a/cmd-list-windows.c
+++ b/cmd-list-windows.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-list-windows.c,v 1.32 2009-03-28 16:30:05 nicm Exp $ */
+/* $Id: cmd-list-windows.c,v 1.33 2009-03-28 20:17:29 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -68,7 +68,7 @@ cmd_list_windows_exec(struct cmd *self, struct cmd_ctx *ctx)
size = 0;
for (i = 0; i < gd->hsize; i++) {
size += gd->size[i] * sizeof **gd->data;
- size += gd->size[i] * sizeof (u_short);
+ size += gd->usize[i] * sizeof **gd->udata;
}
size += gd->hsize * (sizeof *gd->data);
size += gd->hsize * (sizeof *gd->size);