From owner-svn-src-head@freebsd.org Tue Mar 20 20:28:49 2018 Return-Path: Delivered-To: svn-src-head@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 26072F6BD1B; Tue, 20 Mar 2018 20:28:49 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: from mail-lf0-f50.google.com (mail-lf0-f50.google.com [209.85.215.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8E134860DC; Tue, 20 Mar 2018 20:28:48 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: by mail-lf0-f50.google.com with SMTP id z143-v6so4603591lff.3; Tue, 20 Mar 2018 13:28:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=JYWby4RW8scqS1cJmu6Ofvy1RtBeXHP8kaI6yFcUpMI=; b=r8u6WekeHdaT6PxBSg4NhFjdcotdDJ1E8jvMp6ZjWEkSGldmbW5EOpf57fqfe8cwV8 SDwyqiiCCk2yCJqG6+mf+tdA819HDzFaQM7aUMlb1X+E9UvGv82i7xjQtHxeQSktYR4x C289gXVQEF4Bd4FoXrPCPfDujU4nC8v4KuWlIuZGK/kIdejjXcR0jEhbZUztQTJ4Ab0a i784nQk45iGyH/jegNa3xka/KTdl0OJKR1NfvBb8Z80bOC0LkoTiet0igTWktDaOzGOH 59bBFYzGn166nyHz+iyqmwmbfvPhM2R1IC/sysfCabhkvayuBpj2EZ9hn/UcS2iSlucR /MtQ== X-Gm-Message-State: AElRT7GY8/ta513brIFq5ByZJtCIVC/YWMggGUJpcyKZuvu0Q3GrRhiV IIFP2HQauhQjHUDW1eO0UZukIapw X-Google-Smtp-Source: AG47ELuebvO/Ss+4x/NL5/3wcg92fuG74+IpjdWrLlN6Dwa0WG7YqNTJSoJgjaChrk1LG6EzYI42ow== X-Received: by 10.46.137.203 with SMTP id c11mr12210769ljk.61.1521577721134; Tue, 20 Mar 2018 13:28:41 -0700 (PDT) Received: from mail-lf0-f50.google.com (mail-lf0-f50.google.com. [209.85.215.50]) by smtp.gmail.com with ESMTPSA id b67-v6sm632146lfh.26.2018.03.20.13.28.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Mar 2018 13:28:41 -0700 (PDT) Received: by mail-lf0-f50.google.com with SMTP id e5-v6so4586426lfb.7; Tue, 20 Mar 2018 13:28:41 -0700 (PDT) X-Received: by 2002:a19:c4c8:: with SMTP id u191-v6mr12599716lff.109.1521577720852; Tue, 20 Mar 2018 13:28:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.46.129.90 with HTTP; Tue, 20 Mar 2018 13:28:19 -0700 (PDT) In-Reply-To: References: <201803202005.w2KK5CFl026172@repo.freebsd.org> From: Kyle Evans Date: Tue, 20 Mar 2018 15:28:19 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r331257 - head/stand/lua To: Devin Teske Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 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: Tue, 20 Mar 2018 20:28:49 -0000 On Tue, Mar 20, 2018 at 3:15 PM, Devin Teske wrote: > >> On Mar 20, 2018, at 1:05 PM, Kyle Evans wrote: >> >> Author: kevans >> Date: Tue Mar 20 20:05:11 2018 >> New Revision: 331257 >> URL: https://svnweb.freebsd.org/changeset/base/331257 >> >> Log: >> lualoader: Reset attributes and color scheme with color.highlight() >> >> 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. >> >> Reported by: emaste >> >> Modified: >> head/stand/lua/color.lua >> >> Modified: head/stand/lua/color.lua >> ============================================================================== >> --- 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 >> >> return color >> > > 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 Thanks! Fixed, with this map written in blood, in r331259. =) We had a couple of other instances where we went for the 'reset everything' approach rather than the more polite terminators.