From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27259 invoked by alias); 7 Sep 2015 08:59:07 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 36440 Received: (qmail 28279 invoked from network); 7 Sep 2015 08:59:06 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-AuditID: cbfec7f4-f79c56d0000012ee-fa-55ed4f7b3eb6 Date: Mon, 07 Sep 2015 09:48:56 +0100 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: region_highlight cancels styles set in zle_highlight Message-id: <20150907094856.2634355a@pwslap01u.europe.root.pri> In-reply-to: <20150907020814.GB6263@tarsus.local2> References: <20150905104449.GB1895@tarsus.local2> <20150906182230.27d259eb@ntlworld.com> <20150907020814.GB6263@tarsus.local2> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrCLMWRmVeSWpSXmKPExsVy+t/xq7rV/m9DDRoPGlkcbH7I5MDoserg B6YAxigum5TUnMyy1CJ9uwSujBsdF1gLPnNVbH58n62B8RVHFyMnh4SAicT8joPMELaYxIV7 69m6GLk4hASWMkosfPiIBcKZwSRx7e0/JghnK6PEwQXvmUBaWARUJX6tPswKYrMJGEpM3TSb EcQWERCXOLv2PAuILSzgKLH11hogm4ODV8BeYvmxXJAwp4CRROOD3cwQMxsYJX5sbgOr5xfQ l7j69xMTxEn2EjOvnAGbySsgKPFj8j2wGmYBLYnN25pYIWx5ic1r3oK9ICSgLnHj7m72CYxC s5C0zELSMgtJywJG5lWMoqmlyQXFSem5hnrFibnFpXnpesn5uZsYIWH7ZQfj4mNWhxgFOBiV eHgNet+ECrEmlhVX5h5ilOBgVhLhNdkCFOJNSaysSi3Kjy8qzUktPsQozcGiJM47d9f7ECGB 9MSS1OzU1ILUIpgsEwenVANj2qF9p+TTbiTMerO/1Hdz8JJlPb4L3tj3vk+UWWVVOHGh6aXi Wz3BMvb/Tk8SefMoQpbr0pl2p3/bpsg2GJku8ZXZseHf2aVla58+OJr1/c1UfetAnetMLo6P bbaV2J65lz/t6uJ9XtXMXy7Vb7CZ+K2q2ULKVVpa//9KWfO3M3ZUrK/X8vjAocRSnJFoqMVc VJwIAAjrnEFXAgAA On Mon, 7 Sep 2015 02:08:14 +0000 Daniel Shahaf 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 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@samsung.com | Phone: +44 1223 434724 | www.samsung.com