From b8188f52eb223c1c6b6d3d5d8e5fb1ec927ae065 Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Sat, 11 Mar 2017 13:56:06 +0000 Subject: [PATCH] Fix the attribute for scteken_clear() (change it back from the user user default normal attribute to the current attribute). This change only fixes a logic error. scterm_clear() used to be used for terminal reset, but teken uses a general fill function for that, leaving scterm_clear() only used for initialization and mode change, when using the user default attribute is correct. It is not really a terminal function, but needs to sync its changes with the terminal layer. Syncing of the attribute is currently broken for terminal reset, but works for initialization and mode change. --- sys/dev/syscons/scterm-teken.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/dev/syscons/scterm-teken.c b/sys/dev/syscons/scterm-teken.c index 046325ef0325..35782d8d8cad 100644 --- a/sys/dev/syscons/scterm-teken.c +++ b/sys/dev/syscons/scterm-teken.c @@ -227,10 +227,13 @@ scteken_default_attr(scr_stat *scp, int color, int rev_color) static void scteken_clear(scr_stat *scp) { + teken_stat *ts = scp->ts; sc_move_cursor(scp, 0, 0); scteken_set_cursor(scp, 0, 0); - sc_vtb_clear(&scp->vtb, scp->sc->scr_map[0x20], SC_NORM_ATTR << 8); + sc_vtb_clear(&scp->vtb, scp->sc->scr_map[0x20], + scteken_te_to_sc_attr(teken_get_curattr(&ts->ts_teken)) + << 8); mark_all(scp); }