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



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