From 22ef1a1379b855c1724a4abb415674ecbdee166a Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Fri, 26 Sep 2008 07:41:01 +0000 Subject: [PATCH] SGR should not reset charset... don't know how this worked before... --- input.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 @@ -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;