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 36444
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- Subject: Re: region_highlight cancels styles set in zle_highlight
- Date: Mon, 7 Sep 2015 21:21:20 +0000
- Cc: zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=bp20pwrL4cNLu0I9QsXxqeWY4KE=; b=dYh0fJ E89IYH942vaDZzkVqXfGmuHrPW6uVyvp8eo4MakfHFbLrAWIYwPnDpXn/AcYVrm3 iXJKPBOlll0mHKdWC1gOJNVd29wRPxSWTQsBkGJxMDWKIEKFDpMDAuEkvuVShH01 OgVmkdEEFPV9cDbyM/inuskQMCVL+UPVnputo=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=bp20pwrL4cNLu0I9QsXxqeWY4KE=; b=eIiqn qubwBliQXmLfosNFHOstmMnWM1RPerNOYPOH4XX9OhThOnphriUaik/g1SxmLxPv POwsh5PKqxvCV2fxUt8GTZI1jG9sTp1pvhy+2Xaq/qB1Bm+2U4NZw88gJzkRC+HE B26qP7iwyzaO3oCj/382B86Sdpkt8qY1I391g4=
- In-reply-to: <20150907094856.2634355a@pwslap01u.europe.root.pri>
- 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
- References: <20150905104449.GB1895@tarsus.local2> <20150906182230.27d259eb@ntlworld.com> <20150907020814.GB6263@tarsus.local2> <20150907094856.2634355a@pwslap01u.europe.root.pri>
Peter Stephenson wrote on Mon, Sep 07, 2015 at 09:48:56 +0100:
> 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.
Committed with a small tweak to also list 'suffix' in the list of
zle_highlight contexts that apply prior to region_highlight.
> 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.
Thanks for the pointer, it was useful.
Cheers,
Daniel
Messages sorted by:
Reverse Date,
Date,
Thread,
Author