diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2008-09-26 07:41:01 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2008-09-26 07:41:01 +0000 |
commit | 22ef1a1379b855c1724a4abb415674ecbdee166a (patch) | |
tree | 4476fb2cf6e183256705ae2eb56a8d6a1ef21f39 /input.c | |
parent | 93aa3f3c213ca308e0834fb88e804a9966d1ccb8 (diff) |
SGR should not reset charset... don't know how this worked before...
Diffstat (limited to 'input.c')
-rw-r--r-- | input.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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; |