zsh-workers
 help / color / mirror / code / Atom feed
From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: How can Zle -U interfere with zsh-syntax-highlighting?
Date: Sat, 14 May 2016 23:07:20 +0200	[thread overview]
Message-ID: <CAKc7PVCZhyjPqzgPSrKOUs=+Qp5m_yELs2uEAwuCQYZXDKkxUg@mail.gmail.com> (raw)

Hello
Below is a widget that outputs long sophisticated string with zle -U:

testwidg() {
  zle -U 'a=; a=${(r:100000::_:)a}; len=${#a}; zshstyle() { repeat
100; do b=${a[-5000,-1]}; done }; zshstyle2() { repeat 100; do
b=${a[-5000,len]}; done }; shstyle() { repeat 100; do b=${a:
-5000:5000}; done }; time ( zshstyle ); time ( zshstyle2 ); time (
shstyle )'
}
zle -N testwidg
bindkey '^t' testwidg

With z-sy-h enabled, it takes 4 seconds to appear after pressing
Ctrl-T. Pasting the same text is instant and correct (i.e.
highlighting works). What can be happening? Is there some alternative
to Zle -U?

PS. Recently, forks have been optimized out from z-sy-h. No fork for
type -w is done. Without the opt it's not 4 seconds but 10.

Best regards,
Sebastian Gniazdowski


             reply	other threads:[~2016-05-14 21:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-14 21:07 Sebastian Gniazdowski [this message]
2016-05-14 21:23 ` Sebastian Gniazdowski
2016-05-15 11:13 ` Bart Schaefer
2016-05-15 15:24   ` Sebastian Gniazdowski
2016-05-15 15:24     ` Sebastian Gniazdowski
2016-05-15 15:37       ` Mikael Magnusson
2016-05-15 15:41     ` Sebastian Gniazdowski
2016-05-18 17:53       ` Sebastian Gniazdowski
2016-05-19 21:22   ` Daniel Shahaf
2016-05-25  6:14     ` Sebastian Gniazdowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKc7PVCZhyjPqzgPSrKOUs=+Qp5m_yELs2uEAwuCQYZXDKkxUg@mail.gmail.com' \
    --to=sgniazdowski@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).