From 0a9e7af938236e5cda155e6e69ddfa96404d97c3 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Mon, 25 May 2020 18:57:26 +0000 Subject: Use the internal representation for UTF-8 keys instead of wchar_t and drop some code only needed for that. --- usr.bin/tmux/grid.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'usr.bin/tmux/grid.c') 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 @@ -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 -- cgit v1.2.3