summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/input.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2024-10-14 20:26:46 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2024-10-14 20:26:46 +0000
commit10857e20fd084c32f94cc1a53b2325d367c40505 (patch)
tree2ca068ae895d14a4ffa3963c5c1f3443e026bab4 /usr.bin/tmux/input.c
parent922f50f29bf6a978769d27be9dd4605283d6d5e0 (diff)
Set ACS flag for REP. Reported by Romain Francoise, GitHub issue 4182.
Diffstat (limited to 'usr.bin/tmux/input.c')
-rw-r--r--usr.bin/tmux/input.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.bin/tmux/input.c b/usr.bin/tmux/input.c
index f1aa4f8aef5..76a401fdd5c 100644
--- a/usr.bin/tmux/input.c
+++ b/usr.bin/tmux/input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: input.c,v 1.229 2024/09/16 20:38:48 nicm Exp $ */
+/* $OpenBSD: input.c,v 1.230 2024/10/14 20:26:45 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -1145,7 +1145,6 @@ input_print(struct input_ctx *ictx)
ictx->cell.cell.attr |= GRID_ATTR_CHARSET;
else
ictx->cell.cell.attr &= ~GRID_ATTR_CHARSET;
-
utf8_set(&ictx->cell.cell.data, ictx->ch);
screen_write_collect_add(sctx, &ictx->cell.cell);
@@ -1349,7 +1348,7 @@ input_csi_dispatch(struct input_ctx *ictx)
struct screen_write_ctx *sctx = &ictx->ctx;
struct screen *s = sctx->s;
struct input_table_entry *entry;
- int i, n, m, ek;
+ int i, n, m, ek, set;
u_int cx, bg = ictx->cell.cell.bg;
if (ictx->flags & INPUT_DISCARD)
@@ -1592,6 +1591,11 @@ input_csi_dispatch(struct input_ctx *ictx)
if (~ictx->flags & INPUT_LAST)
break;
+ set = ictx->cell.set == 0 ? ictx->cell.g0set : ictx->cell.g1set;
+ if (set == 1)
+ ictx->cell.cell.attr |= GRID_ATTR_CHARSET;
+ else
+ ictx->cell.cell.attr &= ~GRID_ATTR_CHARSET;
utf8_copy(&ictx->cell.cell.data, &ictx->last);
for (i = 0; i < n; i++)
screen_write_collect_add(sctx, &ictx->cell.cell);