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 707d9a5a for ; Fri, 7 Dec 2018 01:42:36 +0000 (UTC) Received: (qmail 27034 invoked by alias); 7 Dec 2018 01:42:21 -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: 43866 Received: (qmail 19363 invoked by uid 1010); 7 Dec 2018 01:42:21 -0000 X-Qmail-Scanner-Diagnostics: from mail-oi1-f170.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.170):SA:0(-2.0/5.0):. Processed in 3.507074 secs); 07 Dec 2018 01:42:21 -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 :content-transfer-encoding; bh=hOHpEareeJSKIU94/rCbBwRQq/VycGSYNl+eedgY844=; b=ji5ugXrW7roUr0eWxCAFanhahv38XUwHoQUUQLFOwf9qW+kBq1DsVHJjTTZx5972yU NldXn5W1eF8/lbJLYB4CGpVahg9nmFIITxq9ZHuAKmUvs1/79GFfA157tsHoDkAJ5pn2 a6ZheFk8X596ZKZTHq9g8QqLU0z8Ow3QipbUKsnx7KNyzYfzCau1Ke/4UGoGnFZ+BRb+ CYA7uAVN0SturJd+4vyTBcY0BusX6du1WNcRj0k2uCNApYNWnMITyIPaZKM4w6PLqQvO X6yxu2Vi5UgKNkboi8Kcpcee4R330GUz6kJyeDz+rqQogp85ER4MFeigQFBtYjsf9yWA +HyQ== 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:content-transfer-encoding; bh=hOHpEareeJSKIU94/rCbBwRQq/VycGSYNl+eedgY844=; b=QYAEx4iecM5Nz+M/EeE1qmgc+F2eDznJG55ko9cPD54ynYcYbA7Rc981F5F/vpkbEV 9IPLVNT3RuJAqIuHtpZustRvQYnUv4GIGufa7AERq9k49/ymC8Ho2HNQsaeukz8RSwMv QVEEBGN1anAEbHBBw12+Kw6IlXq9stC0luvOsLAVbw+N17giBKLHuyWugrSL3fqN0j30 jMaZ0m9erdMW+ofSLHoRPpeq/P2Br60rv61HAp07RZHjw1/2zsGNxsHij8BTf3lnfmCj K4/5kpxo3akOvndGqoxFLvF5fNaN/BUR5L6MY6nGJNn/+yFIgucxC1VevmJPe8maAAgD hUiQ== X-Gm-Message-State: AA+aEWY/cBmkkgloA9HYEnwHQODo80864ebP/8d4HVK7xsPz7trXJBHC 3EgUF9aYJXS+koL37WKtcMvQJKZX54dEMru/YWoEvag+ X-Google-Smtp-Source: AFSGD/XK/ZGFLGH30Mb8ebl7CKpyrOZYLfq6VMJUlOJOLZ8NwMdwtVzWYTJn2tXXbunmGWmzPaX/hdDf/NjdOqDEfhY= X-Received: by 2002:aca:195:: with SMTP id 143mr155862oib.322.1544146933944; Thu, 06 Dec 2018 17:42:13 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Sebastian Gniazdowski Date: Fri, 7 Dec 2018 02:42:01 +0100 Message-ID: Subject: Re: [BUG] region_highlight+=( "$start $end standout" ) doesn't work as expected To: Zsh hackers list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I've tested this further. Turns out that when there is no previous style applied, a magical from-nowhere inverse mode (i.e. standout) appears on first selected character: https://asciinema.org/a/KcB0iZNSx4QsYvHFWCT7kFsV2 The point is: I've changed "standout" to "fg=3Dgreen", and did =3D not +=3D on region higlight (to cancel any highlighting) =E2=80=93 I never did any "standout"/inverse mode, so from where it comes? That said, in X04 tests this works (more on the tests in separate thread) =E2=80=93 only 'u' is highlighted with standout. So I wonder what c= an lay (an option?) behind in-realword additional-inverse and in-syntetic-test correct no-additional-inverse. Expecially because this test also is free from additional-inverse: widget() { BUFFER=3D"true word2 word3"; region_highlight+=3D( "0 5 fg=3D196= " ); widgb; }; widgb() { region_highlight=3D( "2 3 standout" ); }; zle -N widget bindkey '^T' widget On Thu, 6 Dec 2018 at 08:03, Sebastian Gniazdowski wrote: > > Hello, > if the first character at which "$start $end standout" should be > applied, i.e. $start character, is already highlighted, the style > standout will not be applied to it: > > http://psprint.blinkenshell.org/standout-wrong-1.gif > > Confirmation: If I manually force F-Sy-H code to clear previous > region_highlight content's before appliying "$start $end standout" to > region_highlight, then everything works =E2=80=93 i.e. also $start charac= ter > is highlighted: > > http://psprint.blinkenshell.org/standout-ok-2.gif > > So basically the problem is: no standout-highlighting of $start > character if region_highlight has already an entry covering the $start > character. > > I.e. region_highlight+=3D( "$start $end standout" ) will not work for > $start character. > > A more permanent link for the gifs: > > https://github.com/zdharma/fast-syntax-highlighting/issues/92#issuecommen= t-444768370 > -- > 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