Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: Re: region_highlight converts `fg=default` to `none`, which is not the same
- X-seq: zsh-workers 54056
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Oliver Kiddle <opk@xxxxxxx>
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: PATCH: Re: region_highlight converts `fg=default` to `none`, which is not the same
- Date: Sun, 9 Nov 2025 01:39:56 +0100
- Archived-at: <https://zsh.org/workers/54056>
- In-reply-to: <50174-1762646669.160708@Akr8.-N_X.ujkr>
- List-id: <zsh-workers.zsh.org>
- References: <CAHLkEDv9ch+nhtpYF3So+029J6GMv5iU-8=RzHRHLa7OYzc3kg@mail.gmail.com> <88618-1762556365.023840@KaS5.q-Op.UPLl> <50174-1762646669.160708@Akr8.-N_X.ujkr>
On Sun, Nov 9, 2025 at 1:04 AM Oliver Kiddle <opk@xxxxxxx> wrote:
>
> I wrote:
> > With this patch, if you want bold text and no inherited attributes, you
> > need: none,bold
> > They apply in sequence.
>
> I noticed that with the syntax highlighting plugins, "none" is used as
> the default for various contexts. This resulted in the terminal defaults
> applying and not whatever was given in the default: field of
> zle_highlight.
>
> It then occurred to me that in 5.9, "none" essentially means "inherit"
> because it didn't turn any attributes off. So backward compatibility can
> largely be preserved by defining "none" to mean no additional
> highlighting and add a new type to reset or clear highlighting. This
> uses "clear" but I'm not especially attached to that if someone has
> other suggestions.
"reset" would make a lot of sense to me, it is the term used in a lot
of other places like the ctlseqs document for XTerm, but "clear" makes
the intent pretty obvious as well, so I don't mind it.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author