From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8156 invoked by alias); 24 Mar 2016 15:03:17 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 21403 Received: (qmail 9370 invoked from network); 24 Mar 2016 15:03:14 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 Date: Thu, 24 Mar 2016 07:53:51 -0700 From: Danek Duvall To: Peter Stephenson Cc: Zsh Users Subject: Re: End boldface also ends background color Message-ID: <20160324145351.GA16328@lorien.comfychair.org> Mail-Followup-To: Danek Duvall , Peter Stephenson , Zsh Users References: <160323185356.ZM2458@torch.brasslantern.com> <20160324103837.678f2f36@pwslap01u.europe.root.pri> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160324103837.678f2f36@pwslap01u.europe.root.pri> User-Agent: Mutt/1.5.20 (2010-04-22) On Thu, Mar 24, 2016 at 10:38:37AM +0000, Peter Stephenson wrote: > On Wed, 23 Mar 2016 18:53:56 -0700 > Bart Schaefer wrote: > > There's no TCBOLDFACEEND, which I presume is why %b resorts to turning > > off everything. But I don't know much about how the txt* macros work. > > The bottom level of this, where it feeds into termcap, is > settextattributes() in zle_referesh.c: > > if (txtchangeisset(atr, TXTNOBOLDFACE)) > tsetcap(TCALLATTRSOFF, 0); > > Even in terminfo there doesn't seem to be exit_bold_mode, unlike > standout, reverse and underline (though it looks like standout maps to > reverse here). > > If you look at the definitions, you'll see that \e[1m turns on bold, > \e[7m reverse, \e[4m underline. The definitions mapping to exit reverse > and exit underline are \e[27m and \e[24m. Nothing maps to \e[21m that I > can see. It works on some terminals, I used gnome-terminal: > > print -P "first%Ufoo%{\e[1m%}bar%{\e[21m%}more%ulast" > > However, that didn't seem to work on xterm (a few years old), so > apparently we can't assume it. Worth at least pinging Thomas Dickey to add the capability to xterm, and to create a new capability for ncurses -- or at least find out if there's a reason it doesn't exist? Once you build zsh against the new version of both, it would work, and you'd get historical behavior until then. Danek