From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 41f38cb6 for ; Sun, 9 Dec 2018 19:20:29 +0000 (UTC) Received: (qmail 22851 invoked by alias); 9 Dec 2018 19:20:19 -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: 43877 Received: (qmail 25783 invoked by uid 1010); 9 Dec 2018 19:20:19 -0000 X-Qmail-Scanner-Diagnostics: from mail-oi1-f180.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.100.2/25112. spamassassin: 3.4.2. Clear:RC:0(209.85.167.180):SA:0(-2.0/5.0):. Processed in 2.735834 secs); 09 Dec 2018 19:20:18 -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:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=DYiL8gojhlXi+J7wLkcVBuVXw79u0Vp6QxeZmVHgUVU=; b=XOVcnPMoT61oK6M0KyxOgOqa4soeQ9icefBr4wJQlayet9WIDh6fMKfWDTeIuX0cEH Aa6Cm0uKm6Di4Q2Uk9aK34Khz1sGQsUkVGtb2oZPava4Jx3XoxWvNsK2qSXIk5R+Lb3M jSzXQ88sh+IC9B4oyF8U5THGAjM1FRhFSpiqmvAP9Y9D8qH14BYZnUg+ZEkVGPVyuTu5 oFDgGh3tYrYxhvtReF+xtnHPpY+YNa6UKbA66jf4k+8B63i6abTQv0WY9H0fH/X+RaS4 a83EslCYjfJw9scvlb8JpIzhr+G6OrTFk2Xh1kcQT7LI94aTXSnxK+3lfSWa1siOx6hE 8N5Q== 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:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=DYiL8gojhlXi+J7wLkcVBuVXw79u0Vp6QxeZmVHgUVU=; b=WuDxsvFMJNh25oJu7kUuoxeJDiUKWGsuahoOEAlzVCky9MBul0umHce4zVCFL8SoN2 q9J3o5BeDdmYLQVRA8rEB2V1DrdmHW+icE6xDOSZNFs0wPNFMxBJrfVG0S/a/ympd3sy PD8QkLlIdwLwXtLm8BJHCEGBJROpWkk8kliaAJEEPNFn0pyHc+nBSE7hFgUdoKv7X/Nb 9vgq2sT+HXPHJh/HKAGzcpwHHSyPw85AYypnnQYoBJ7NilkGtDyszk7d8crHAdTPa9l0 O2q+vQdP22SNC7xfNzpVCIRqSt5AGwTaCkCi/t+RuvIgTQryzOzxNlWZTokFqy4TYywB oPHg== X-Gm-Message-State: AA+aEWZmNix0zTTvY+IMqw2m/+Jfq4MyAsivb+FaU7d5yjjOapW/2MBa vBUbB+gPS3wc3JthFs1hA0tU533YLnRcvBt/5ps= X-Google-Smtp-Source: AFSGD/Wk0VvwVUFXNP+eHJO1QG0gERDmppKkUu04MU25q+Q35A8KIX3sBp1YrY5PBmrNpJj1+DyjrN4jXsPxpGruK2s= X-Received: by 2002:aca:1e17:: with SMTP id m23mr6148080oic.332.1544383213065; Sun, 09 Dec 2018 11:20:13 -0800 (PST) MIME-Version: 1.0 References: <1544168721.2479259.1601798392.35689542@webmail.messagingengine.com> <53005dd0750e99fb654f5708a6e256dbea6f899a.camel@ntlworld.com> In-Reply-To: <53005dd0750e99fb654f5708a6e256dbea6f899a.camel@ntlworld.com> From: Sebastian Gniazdowski Date: Sun, 9 Dec 2018 20:20:00 +0100 Message-ID: Subject: Re: [BUG] region_highlight+=( "$start $end standout" ) doesn't work as expected To: Peter Stephenson Cc: Daniel Shahaf , Zsh hackers list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, 9 Dec 2018 at 19:49, Peter Stephenson wrote: > > > Could the problem be fixed, .. ASAP? > > I won't be working on this, but I can give some poiners. > > You'll need to look in Src/Zle/zle_refresh.c. You'll see the > region_highlights variable that contains the information. There are 4 > special regions at the start --- see definition of > N_SPECIAL_HIGHLIGHTS. > > There are two key points in turning this information into the output. > One is following the comment "Calculate attribute based on region". > That's where the information gets encoded into the array of characters > to output, which remembers the attributes associated with the character > based on the last thing to change. > > The other is inside settextattributes(), where the appropriate sequences > are output. That's called at various points during the output, but only > if we detect something has changed in them: zwcputc() is the key > location, but you'll see there are others. I think I've already resolved this in the patch in email "[PATCH] Make 256 color codes be based on zle_highlight array, not on termcap". The function settextattributes() uses function from prompt.c: set_colour_attribute(zattr atr, int fg_bg, int flags). It is there where fg_start_code, etc. are read and set. Also, I think thath zle_refresh.c code probably falls through to prompt.c =E2=80=93 output_colour(int colour, int fg_bg, int use_tc, int truecol, char *buf), as I've had to change a condition there to not use termcap for the 248 colors, but zle_highlight instead. > > > Could the problem be fixed, .. ASAP? > I was so pressured at this that I've done it myself :) it's in the "[PATCH] Make 256 ..." email that contains the proposed patch. --=20 Sebastian Gniazdowski News: https://twitter.com/ZdharmaI IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin Blog: http://zdharma.org