Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
How can Zle -U interfere with zsh-syntax-highlighting?
- X-seq: zsh-workers 38491
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: How can Zle -U interfere with zsh-syntax-highlighting?
- Date: Sat, 14 May 2016 23:07:20 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=BEx5bGgg/diXfVTexEa4iSokBtTz7gqoAwbccEHU9tI=; b=vNXkzbX79etsukpUw5/wV9hElE/LU29HnxGnOFnhIt6XgHZdmrIdK35ubnPuYhdsDN xeXeodK5ckY//oxQa18AUzl4TLI0HWh7taDVGYvNHZT9BBOJwV1Bj+VaVup3BTGPr9BM Wsv5MH9ORPFAvJoFhmgZPnV4ESxWbuJW4OADvlp7OWP3tm49ctkaN+/n8xRjbQlNVko0 4k0Zl4jJc8sp7v4WKz4BE+7P7YMN0NrvgDUu7CpAFYEFOazVPlbaeF7He4JYFyPAajo1 HRriTDdDUXzuXsCET/selu5iCfDy8hlEgdF+JLMoY0eD+jIKiBrFkl5UPOXRAXR97oOY M2gw==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author