terminal: move fore/background colors from grid to terminal

This commit is contained in:
Daniel Eklöf 2019-06-29 21:09:58 +02:00
parent 3d2ab03f62
commit 8723098cda
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
3 changed files with 11 additions and 12 deletions

8
csi.c
View file

@ -92,8 +92,8 @@ sgr_reset(struct terminal *term)
{
memset(&term->vt.attrs, 0, sizeof(term->vt.attrs));
term->vt.dim = false;
term->vt.attrs.foreground = term->grid.foreground;
term->vt.attrs.background = term->grid.background;
term->vt.attrs.foreground = term->foreground;
term->vt.attrs.background = term->background;
}
static bool
@ -172,7 +172,7 @@ csi_sgr(struct terminal *term)
break;
}
case 39:
term->vt.attrs.foreground = term->grid.foreground;
term->vt.attrs.foreground = term->foreground;
term->vt.attrs.have_foreground = false;
break;
@ -218,7 +218,7 @@ csi_sgr(struct terminal *term)
break;
}
case 49:
term->vt.attrs.background = term->grid.background;
term->vt.attrs.background = term->background;
term->vt.attrs.have_background = false;
break;