zsh-workers
 help / color / mirror / code / Atom feed
* How can Zle -U interfere with zsh-syntax-highlighting?
@ 2016-05-14 21:07 Sebastian Gniazdowski
  2016-05-14 21:23 ` Sebastian Gniazdowski
  2016-05-15 11:13 ` Bart Schaefer
  0 siblings, 2 replies; 10+ messages in thread
From: Sebastian Gniazdowski @ 2016-05-14 21:07 UTC (permalink / raw)
  To: Zsh hackers list

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-05-25  6:14 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-14 21:07 How can Zle -U interfere with zsh-syntax-highlighting? Sebastian Gniazdowski
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

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).