Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: region_highlight cancels styles set in zle_highlight
- X-seq: zsh-workers 36440
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: region_highlight cancels styles set in zle_highlight
- Date: Mon, 07 Sep 2015 09:48:56 +0100
- In-reply-to: <20150907020814.GB6263@tarsus.local2>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Organization: Samsung Cambridge Solution Centre
- References: <20150905104449.GB1895@tarsus.local2> <20150906182230.27d259eb@ntlworld.com> <20150907020814.GB6263@tarsus.local2>
On Mon, 7 Sep 2015 02:08:14 +0000
Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> Peter Stephenson wrote on Sun, Sep 06, 2015 at 18:22:30 +0100:
> > On Sat, 5 Sep 2015 10:44:49 +0000
> > Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> > > How do $zle_highlight and $region_highlight interact? Which one takes
> > > precedence if a certain byte range is covered by both?
> >
> > The special forms of highlight (the ones that apply to regions, so not,
> > for example, unprintable characters) are treated as the initial set of
> > entries in the array of highlights to apply, with any user-specified
> > ones in region_highlight following in order, with later values
> > overriding earlier ones.
>
> Thanks. Patch to doc this:
Thanks, that's useful.
By the way, the code for this is fairly localised in
Src/Zle/zle_refresh.c, with the decisions made in the chunk of code at
the top of character loop in singlerefresh() after the comment
"Calculate attributes based on region": the special and user-defined
attributes have been coalesced into the array region_highlights at this
point. So if there's a good argument for alternative or variant
behaviour it shouldn't be too difficult, by ZLE standards.
pws
--
Peter Stephenson | Principal Engineer Samsung Cambridge Solution Centre
Email: p.stephenson@xxxxxxxxxxx | Phone: +44 1223 434724 |
www.samsung.com
Messages sorted by:
Reverse Date,
Date,
Thread,
Author