Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: region_highlight converts `fg=default` to `none`, which is not the same



Roman Perepelitsa wrote on Tue, 13 Oct 2020 13:05 +0200:
> On Mon, Oct 12, 2020 at 11:23 AM Marlon Richert
> <marlon.richert@xxxxxxxxx> wrote:
> >
> >  1. It seems incorrect to convert `fg=default` to `none`. From reading the [documentation](http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Character-Highlighting), `none` is not supposed to be the same as `fg=default`.  
> 
> I took a quick look at this yesterday. When you print region_highlight
> and "fg=default" comes out as "none", that's a bug in the printing
> logic (function output_highlight in Src/prompt.c). It's fairly easy to
> fix -- patch below (only for fg; bg should be handled similarly).
> Naturally, it doesn't solve the other issues you've described. I
> haven't looked at why the highlight doesn't get applied as it should
> be.

z-sy-h does «region_highlight_copy=("${region_highlight[@]}"); …
region_highlight=("${region_highlight_copy[@]}");» around invoking
a highlighter, so the serialization bug could explain the observed ZLE
behaviour, couldn't it?

> Roman.
> 
> P.S.
> 
> zsh-workers is the correct mailing list for this discussion.





Messages sorted by: Reverse Date, Date, Thread, Author