summaryrefslogtreecommitdiffstats
path: root/input.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2008-09-26 07:41:01 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2008-09-26 07:41:01 +0000
commit22ef1a1379b855c1724a4abb415674ecbdee166a (patch)
tree4476fb2cf6e183256705ae2eb56a8d6a1ef21f39 /input.c
parent93aa3f3c213ca308e0834fb88e804a9966d1ccb8 (diff)
SGR should not reset charset... don't know how this worked before...
Diffstat (limited to 'input.c')
-rw-r--r--input.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/input.c b/input.c
index b69cd1b5..e5e854c0 100644
--- a/input.c
+++ b/input.c
@@ -1,4 +1,4 @@
-/* $Id: input.c,v 1.61 2008-09-26 07:34:12 nicm Exp $ */
+/* $Id: input.c,v 1.62 2008-09-26 07:41:01 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -1132,9 +1132,12 @@ input_handle_sequence_sgr(struct input_ctx *ictx)
struct grid_cell *gc = &ictx->cell;
u_int i;
uint16_t m, o;
+ u_char attr;
if (ARRAY_LENGTH(&ictx->args) == 0) {
+ attr = gc->attr;
memcpy(gc, &grid_default_cell, sizeof *gc);
+ gc->attr |= (attr & GRID_ATTR_CHARSET);
return;
}
@@ -1165,7 +1168,9 @@ input_handle_sequence_sgr(struct input_ctx *ictx)
switch (m) {
case 0:
case 10:
+ attr = gc->attr;
memcpy(gc, &grid_default_cell, sizeof *gc);
+ gc->attr |= (attr & GRID_ATTR_CHARSET);
break;
case 1:
gc->attr |= GRID_ATTR_BRIGHT;