mirror of
https://github.com/tmate-io/tmate.git
synced 2024-12-24 15:48:58 +01:00
SGR should not reset charset... don't know how this worked before...
This commit is contained in:
parent
93aa3f3c21
commit
22ef1a1379
7
input.c
7
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>
|
* 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;
|
struct grid_cell *gc = &ictx->cell;
|
||||||
u_int i;
|
u_int i;
|
||||||
uint16_t m, o;
|
uint16_t m, o;
|
||||||
|
u_char attr;
|
||||||
|
|
||||||
if (ARRAY_LENGTH(&ictx->args) == 0) {
|
if (ARRAY_LENGTH(&ictx->args) == 0) {
|
||||||
|
attr = gc->attr;
|
||||||
memcpy(gc, &grid_default_cell, sizeof *gc);
|
memcpy(gc, &grid_default_cell, sizeof *gc);
|
||||||
|
gc->attr |= (attr & GRID_ATTR_CHARSET);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1165,7 +1168,9 @@ input_handle_sequence_sgr(struct input_ctx *ictx)
|
|||||||
switch (m) {
|
switch (m) {
|
||||||
case 0:
|
case 0:
|
||||||
case 10:
|
case 10:
|
||||||
|
attr = gc->attr;
|
||||||
memcpy(gc, &grid_default_cell, sizeof *gc);
|
memcpy(gc, &grid_default_cell, sizeof *gc);
|
||||||
|
gc->attr |= (attr & GRID_ATTR_CHARSET);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
gc->attr |= GRID_ATTR_BRIGHT;
|
gc->attr |= GRID_ATTR_BRIGHT;
|
||||||
|
Loading…
Reference in New Issue
Block a user