diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2020-05-25 18:57:26 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2020-05-25 18:57:26 +0000 |
commit | 0a9e7af938236e5cda155e6e69ddfa96404d97c3 (patch) | |
tree | 0b04113eb8c80c70a991a0f66c2906ae5710295b /usr.bin/tmux/grid.c | |
parent | 7bc8779f6c3e9964ccc6c05df20fe72b300378ac (diff) |
Use the internal representation for UTF-8 keys instead of wchar_t and
drop some code only needed for that.
Diffstat (limited to 'usr.bin/tmux/grid.c')
-rw-r--r-- | usr.bin/tmux/grid.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/tmux/grid.c b/usr.bin/tmux/grid.c index 15daac56629..27486db5fb5 100644 --- a/usr.bin/tmux/grid.c +++ b/usr.bin/tmux/grid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: grid.c,v 1.111 2020/05/25 18:19:29 nicm Exp $ */ +/* $OpenBSD: grid.c,v 1.112 2020/05/25 18:57:24 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -76,7 +76,7 @@ grid_need_extended_cell(const struct grid_cell_entry *gce, return (1); if (gc->attr > 0xff) return (1); - if (gc->data.size != 1 || gc->data.width != 1) + if (gc->data.size > 1 || gc->data.width > 1) return (1); if ((gc->fg & COLOUR_FLAG_RGB) || (gc->bg & COLOUR_FLAG_RGB)) return (1); @@ -496,6 +496,7 @@ grid_get_cell1(struct grid_line *gl, u_int px, struct grid_cell *gc) gc->fg = gee->fg; gc->bg = gee->bg; gc->us = gee->us; + log_debug("!!! %x", gc->flags); utf8_to_data(gee->data, &gc->data); } return; @@ -541,6 +542,7 @@ grid_set_cell(struct grid *gd, u_int px, u_int py, const struct grid_cell *gc) gl->cellused = px + 1; gce = &gl->celldata[px]; + if (gc->flags & GRID_FLAG_PADDING) log_debug("!!! padding %d\n", grid_need_extended_cell(gce, gc)); if (grid_need_extended_cell(gce, gc)) grid_extended_cell(gl, gce, gc); else |