Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
	T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
         :cc;
        bh=v+Kx70P6rN/mxO2NxF8GZ3xiIWgjyFaMFvasE+O0rtg=;
        b=NMXtPBOZegzqcgzCbO0tiFKpwcHxQufGzcMyA8WlIwvcYO8ZDYGQBNdvR/5cLTAXXT
         XBTPs56btZ8YydfFxkeAfPkUO1lnfIzKRTJVHgIXaocFIl/Dsmtsxk/bYZPQz6OAuM1e
         9VajJ0/L6VPCmH7/n0Yj+mBP0MxcwbuK5ZNyztPZzHX7s9xu2VUUZTXkSBQjWkyEbAtj
         sOr0k5IzTONJpsJ7UaE8cuXmAjp4xdtewUQ298HeIMswoYlNZR+f6kif6Ioq+Y46xiT+
         xOwrzeYRYqLSF1AEoT4yl3c4pnoJL46ZOnFF7cC0Ithu1zc47l8MMa+vtDnzuVmXuALM
         U1oA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:in-reply-to:references:from:date
         :message-id:subject:to:cc;
        bh=v+Kx70P6rN/mxO2NxF8GZ3xiIWgjyFaMFvasE+O0rtg=;
        b=Y3ZC1gSyG7g0ty/2qfJsr4esJYDxsbZwrCahtwprW4oQmuPpTcVcnI8RK3SLw119s5
         BLWaIrg35au8Wc1HNe9llfBAuECa7Lv2zQJlFg+feePfv+agHpw6nDxRaDKUY/Zhx1L7
         laAAl2cR3FQpdRk2k4ri0CyE/ZtoEfBN/GcHaDW8wqBwt+lwUMQBLTKLmj6aUOS65ILJ
         4nBOKwNsevWwGbM8smFQDo97tGWgYOhwvi1577qeX+kZwjaXF0XRLL/hmlF4I8iA95wZ
         kcKx5OyEDfVPtlPRxYsThvVvGdKAjsNSB4ydQr5AkJ2UMvxNwSO/buYxpE588OlDwUir
         grdg==
X-Gm-Message-State: AOPr4FWwqeekOirXS0LiZKhAxy1eL44ga4OYHxiQ3xNHx9fQF8tH351WyTE9lMu1FfUFk/MqzvJNZiQkexKcAg==
X-Received: by 10.112.27.233 with SMTP id w9mr10033382lbg.86.1463325859634;
 Sun, 15 May 2016 08:24:19 -0700 (PDT)
MIME-Version: 1.0
In-Reply-To: <CAH+w=7b7g-g7JmFvrgR4ezWz7CrVZnXVrV+u9iOitX0H0y_pVQ@mail.gmail.com>
References: <CAKc7PVCZhyjPqzgPSrKOUs=+Qp5m_yELs2uEAwuCQYZXDKkxUg@mail.gmail.com>
 <CAH+w=7b7g-g7JmFvrgR4ezWz7CrVZnXVrV+u9iOitX0H0y_pVQ@mail.gmail.com>
From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
Date: Sun, 15 May 2016 17:24:00 +0200
Message-ID: <CAKc7PVDQ-1Kh7EngkJSmB7buk0bEAkwsgZZVhLWW-fMaqnsdKw@mail.gmail.com>
Subject: Re: How can Zle -U interfere with zsh-syntax-highlighting?
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Content-Type: text/plain; charset=UTF-8
X-Seq: zsh-workers 38497

On 15 May 2016 at 13:13, Bart Schaefer <schaefer@brasslantern.com> wrote:
>> Is there some alternative to Zle -U?
>
> Other than just LBUFFER+="long text here", no.  If you want the other
> effects of zle -U (i.e., that each character is interpreted as if it
> had been typed) then there is no alternative.

Forgot about LBUFFER, thanks! I have two tools, and it is interesting
that in one (n-history) doing LBUFFER+="$var_with_long_text" causes
highlighting to correctly work (and also solves the lag issue) whie in
other tool (n-kill) it doesn't trigger highlighting. I made the two
responsible code blocks identical (I do zle redisplay and zle
kill-buffer before zle -U / LBUFFER+=), even hardcoded the text:

LBUFFER+='a=; a=${(r:100000::_:)a}...'

and it still behaves this way. Both tools use emulate -L zsh, also
tried emulate -LR zsh. Luckily, I need LBUFFER+= only in the one tool
that works.

Best regards,
Sebastian Gniazdowski

