From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: zsh-workers-return-43797-ml=inbox.vuxu.org@zsh.org X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 32cbbac6 for ; Wed, 7 Nov 2018 14:40:45 +0000 (UTC) Received: (qmail 5406 invoked by alias); 7 Nov 2018 14:40:34 -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: List-Unsubscribe: X-Seq: 43797 Received: (qmail 11685 invoked by uid 1010); 7 Nov 2018 14:40:34 -0000 X-Qmail-Scanner-Diagnostics: from mail-oi1-f179.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.167.179):SA:0(-2.0/5.0):. Processed in 1.824774 secs); 07 Nov 2018 14:40:34 -0000 X-Envelope-From: sgniazdowski@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:from:date:message-id:subject:to :content-transfer-encoding; bh=vZ0sDZ0VPkQSzx8XDx+OKaamliEni8wKDNh9zGMl61s=; b=HTBiaZ2GtmmH6vgd7dDKMAXt9ATp1wCYzbcExbWFrJ31Jqgptg8qRkkG7lQ2OOerFI 0rWGMjAhui2C9NPWhuUkYjju5L6z8i/95encDsJN3oQW2Y+lqOoE5Wg/dvXeo4CS1tl/ /9OIIUVLVLGhJJwQtsc0S6Qh9WBlchM/SFYk4lCXY6DKXQn1RTs67y2mBiY3QkSdzFzw LnV8/3LB9suJA7NeIkrEFq1tF45PFLZhywXqfTq4t/ozTulGcH9QjaVa4hGj/LT1nq94 JVQyk34eZWzx/j2bjhMEG841udZXN9WeUT/8kZAuoCGymBV0S9fLP6q1Ra+PVdVDGRJN lshA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:from:date:message-id :subject:to:content-transfer-encoding; bh=vZ0sDZ0VPkQSzx8XDx+OKaamliEni8wKDNh9zGMl61s=; b=NaYo06jXH/KYrYI962gS8sVB2Pm9lg/FNYEIhkDGW9CDP5IxLpfDHbefGeCyz/Sp7G +ER9SMcSkAEKRr3ZOFzm6iUyX+p91oj49+0vM0tGbHG/GhFsw5RegqO0agwP9FNwlBff OMq1smBIodX2HdmlUKl22oE4VCbEwiLivP7kaXMW/5v2/Ma6vX3hyZkn/13SnsJk6QPJ MNj1CAdFQw+tolY2lWT1Syd8WjYaXsMrGkNDZBTzN6Q2AWp/nFhDK5QYONzYzGeg4HJd 4j1p0vNIprUIS30agoS4fTsuDfanjdXyEbplNun0dResUTSYfjsNzNWnlvPvoWprhAe8 qvHw== X-Gm-Message-State: AGRZ1gIasn3UwcrYDMm5D2NiFUwZ5TyytSkuA0mECwpdvFV5Ho2iFv0S +wwk5kkaDCStWtfzbVvLkN4SB7Q2Hc5nIc0hk7B3sbnN X-Google-Smtp-Source: AJdET5d/j4sEeOjyvPD796oiboWf6qKYhSRd0ZJreFHECG8ERWWfVlSK9sgwsktDDxkoc24XXlAiFHN9+6Wgn6LVmzk= X-Received: by 2002:aca:afd0:: with SMTP id y199-v6mr245911oie.322.1541601629765; Wed, 07 Nov 2018 06:40:29 -0800 (PST) MIME-Version: 1.0 References: From: Sebastian Gniazdowski Date: Wed, 7 Nov 2018 15:40:17 +0100 Message-ID: Subject: Re: [BUG?] If true-color is used, overlapping colors do not work To: Zsh hackers list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable A simpler way to observe this: % zsh -fi % rh_widget() { BUFFER=3D"true"; region_highlight+=3D( "0 4 fg=3D#00cc00" )= ; rh2; }; rh2() { region_highlight+=3D( "1 2 fg=3D#cc0000" ); } zle -N rh_widget bindkey "\C-a" rh_widget % On Wed, 7 Nov 2018 at 14:19, Sebastian Gniazdowski wrote: > > Hello > The last test from the attached ztst reveals this. Before-last test overl= apping colors with standard fg=3Dgreen/fg=3Dred symbols. Result is a word "= true" with "r" in red the rest in green. You can see the colors by doing ca= t /tmp/output. > > With true color, I get: > --- /tmp/zsh.ztst.77121/ztst.out 2018-11-07 14:11:51.000000000 +0100 > +++ /tmp/zsh.ztst.77121/ztst.tout 2018-11-07 14:11:51.000000000 +0100 > @@ -2,5 +2,5 @@ > rh2() { region_highlight+=3D( "1 2 fg=3D#cc0000" ); } > zle -N rh_widget > bindkey "\C-a" rh_widget > -0m32mt31mr39m32mue39m > +0mt38;2;204;0;0mr39mue > > The minus-line is not yet updated, inherited from basic 8-colors case (wh= ich is working and overlapped colors can be observed in the minus-line). Bu= t look at the plus-line. It doesn't emit any color for "t", only true-color= red for "r", and then nothing for "ue". > > With zsh/nearcolor loaded (test code pasted at the end of this email), co= lors are correctly overlapped: > > --- /tmp/zsh.ztst.76836/ztst.out 2018-11-07 14:09:32.000000000 +0100 > +++ /tmp/zsh.ztst.76836/ztst.tout 2018-11-07 14:09:32.000000000 +0100 > @@ -3,5 +3,5 @@ > rh2() { region_highlight+=3D( "1 2 fg=3D#cc0000" ); } > zle -N rh_widget > bindkey "\C-a" rh_widget > -0m32mt31mr39m32mue39m > +0m38;5;40mt38;5;160mr39m38;5;40mue39m > > cat /tmp/output confirms this. > > zsh/nearcolor test case: > > zpty_start > zpty_input 'zmodload zsh/nearcolor' > zpty_input 'rh_widget() { BUFFER=3D"true"; region_highlight+=3D( "0 4 f= g=3D#00cc00" ); rh2; }' > zpty_input 'rh2() { region_highlight+=3D( "1 2 fg=3D#cc0000" ); }' # `r= ' in red; the above line would be too long > zpty_input 'zle -N rh_widget' > zpty_input 'bindkey "\C-a" rh_widget' > zpty_input $'\C-a' > zpty_line 5 # 3 lines echoed back + 3 empty lines (zpty bug) > zpty_line 1 p > zpty_stop > 0:overlapping region_highlight with true-color > >zmodload zsh/nearcolor > >rh_widget() { BUFFER=3D"true"; region_highlight+=3D( "0 4 fg=3D#00cc00" = ); rh2; } > >rh2() { region_highlight+=3D( "1 2 fg=3D#cc0000" ); } > >zle -N rh_widget > >bindkey "\C-a" rh_widget > >0m32mt31mr39m32mue39m > >exit > > -- > Sebastian Gniazdowski > News: https://twitter.com/ZdharmaI > IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin > Blog: http://zdharma.org --=20 Sebastian Gniazdowski News: https://twitter.com/ZdharmaI IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin Blog: http://zdharma.org