From owner-svn-src-all@freebsd.org Tue Mar 20 20:15:55 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BEC9CF6AC8F; Tue, 20 Mar 2018 20:15:55 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D49B852C4; Tue, 20 Mar 2018 20:15:55 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [74.217.198.10] (port=62242 helo=[10.1.4.66]) by shxd.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1eyLTY-000Nnx-3L; Tue, 20 Mar 2018 17:55:08 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r331257 - head/stand/lua From: Devin Teske In-Reply-To: <201803202005.w2KK5CFl026172@repo.freebsd.org> Date: Tue, 20 Mar 2018 13:15:46 -0700 Cc: Devin Teske , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201803202005.w2KK5CFl026172@repo.freebsd.org> To: Kyle Evans X-Mailer: Apple Mail (2.3273) Sender: devin@shxd.cx X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Mar 2018 20:15:55 -0000 > On Mar 20, 2018, at 1:05 PM, Kyle Evans wrote: >=20 > Author: kevans > Date: Tue Mar 20 20:05:11 2018 > New Revision: 331257 > URL: https://svnweb.freebsd.org/changeset/base/331257 >=20 > Log: > lualoader: Reset attributes and color scheme with color.highlight() >=20 > Previously, we sent a CSI 0m sequence to reset attributes, which also = reset > the color scheme if the terminal defaults didn't match what we're = expecting. > Go all-in and reset the color scheme, too, just in case. >=20 > Reported by: emaste >=20 > Modified: > head/stand/lua/color.lua >=20 > Modified: head/stand/lua/color.lua > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/stand/lua/color.lua Tue Mar 20 19:28:52 2018 = (r331256) > +++ head/stand/lua/color.lua Tue Mar 20 20:05:11 2018 = (r331257) > @@ -96,7 +96,9 @@ function color.highlight(str) > if color.disabled then > return str > end > - return core.KEYSTR_CSI .. "1m" .. str .. core.KEYSTR_CSI .. "0m" > + -- We need to reset attributes as well as color scheme here, = just in > + -- case the terminal defaults don't match what we're expecting. > + return core.KEYSTR_CSI .. "1m" .. str .. color.default() > end >=20 > return color >=20 You should CSI 22m to terminate CSI 1m The corresponding terminators for common effects: CSI 1m ... CSI 22m CSI 2m ... CSI 22m CSI 4m ... CSI 24m CSI 5m ... CSI 25m CSI 7m ... CSI 27m CSI 8m ... CSI 28m CSI (30-37)m ... CSI 39m CSI (40-47)m ... CSI 49m --=20 Devin=