From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26566 invoked by alias); 7 Sep 2015 02:17:59 -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: 36437 Received: (qmail 1920 invoked from network); 7 Sep 2015 02:17:56 -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=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU autolearn=ham autolearn_force=no version=3.4.0 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=nZZzBnnrklRYcztmZiTXNslFX/s=; b=pPD46R h7s22ruNrib7nh8oAlPlnYxvDe2YOU2vaaQhXqsG2NMmo6FSiDRt+D9VBG/f10Wt VOumGbBWQCRA8R/S4bLZFXTXvE8C846HOXCfAZMLdhzwjaVOCUX1I+XAS8ddyhny UFCB43DtpTYdpD2iIPRmXl9Q5tQGjzlOBx2nk= 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=nZZzBnnrklRYcztmZiTXNslFX/s=; b=EcT/I WwaqD3cbuB1fei/jUm6N8/TijzVne9fz36gbj05znUpYOgQUpbta/h2km0/Ffc8C wr1BZN5HTg9Maano8W7tzrbHYhSSv6rLGO+DbTNUR1lof8OGotHGVGnVd+PvabDZ ykkGxL91RSpvN8mNjBmi5msEpVkh8Ob80OFLHM= X-Sasl-enc: 7j+nvVnFZ16vbDqPxiRgNQF8HjyiWeiI7RZsdZtkc5oE 1441591696 Date: Mon, 7 Sep 2015 02:08:14 +0000 From: Daniel Shahaf To: Peter Stephenson Cc: zsh-workers@zsh.org Subject: Re: region_highlight cancels styles set in zle_highlight Message-ID: <20150907020814.GB6263@tarsus.local2> References: <20150905104449.GB1895@tarsus.local2> <20150906182230.27d259eb@ntlworld.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150906182230.27d259eb@ntlworld.com> User-Agent: Mutt/1.5.21 (2010-09-15) 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: diff --git a/Doc/Zsh/zle.yo b/Doc/Zsh/zle.yo index 4e93695..22e8111 100644 --- a/Doc/Zsh/zle.yo +++ b/Doc/Zsh/zle.yo @@ -955,6 +955,11 @@ any predisplay string should be highlighted in bold. Note that the effect of tt(region_highlight) is not saved and disappears as soon as the line is accepted. + +The final highlighting on the command line depends on both tt(region_highlight) +and tt(zle_highlight); see +ifzman(the section CHARACTER HIGHLIGHTING below)\ +ifnzman(noderef(Character Highlighting)) for details. ) vindex(UNDO_CHANGE_NO) item(tt(UNDO_CHANGE_NO) (integer))( @@ -2521,6 +2526,12 @@ Following a command to paste text, the characters that were inserted. ) enditem() +When tt(region_highlight) is set, the contexts that describe a region DASH()- +tt(isearch), tt(region), and tt(paste) DASH()- +are applied first, then tt(region_highlight) is applied, then the remaining +tt(zle_highlight) contexts are applied. If a particular character is +affected by multiple specifications, the last specification wins. + tt(zle_highlight) may contain additional fields for controlling how terminal sequences to change colours are output. Each of the following is followed by a colon and a string in the same form as for key bindings.