From owner-svn-src-head@freebsd.org Sat Mar 11 13:56:08 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C462D0650C; Sat, 11 Mar 2017 13:56:08 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D021312F2; Sat, 11 Mar 2017 13:56:07 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2BDu6o5073991; Sat, 11 Mar 2017 13:56:06 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2BDu6Z0073990; Sat, 11 Mar 2017 13:56:06 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201703111356.v2BDu6Z0073990@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Sat, 11 Mar 2017 13:56:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315066 - head/sys/dev/syscons X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Mar 2017 13:56:08 -0000 Author: bde Date: Sat Mar 11 13:56:06 2017 New Revision: 315066 URL: https://svnweb.freebsd.org/changeset/base/315066 Log: 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. Modified: head/sys/dev/syscons/scterm-teken.c Modified: head/sys/dev/syscons/scterm-teken.c ============================================================================== --- head/sys/dev/syscons/scterm-teken.c Sat Mar 11 11:31:06 2017 (r315065) +++ head/sys/dev/syscons/scterm-teken.c Sat Mar 11 13:56:06 2017 (r315066) @@ -227,10 +227,13 @@ scteken_default_attr(scr_stat *scp, int 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); }