From 0999ab05bafe034fdcbca507f369b669a0b41d35 Mon Sep 17 00:00:00 2001 From: NAKAMURA Yoshitaka Date: Sat, 12 Mar 2011 16:10:04 +0900 Subject: [PATCH] do nothing if PENDING inputs are exist Originally, zsh-syntax-highlighting called highlight functions at every inputs. It's OK for user's keyboard inputs. But when long inputs come from clipboard, it cause noticeable slowdown. --- zsh-syntax-highlighting.zsh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zsh-syntax-highlighting.zsh b/zsh-syntax-highlighting.zsh index 87ae5d8..b6ff043 100644 --- a/zsh-syntax-highlighting.zsh +++ b/zsh-syntax-highlighting.zsh @@ -52,6 +52,10 @@ typeset -a zsh_highlight_predicates; zsh_highlight_predicates=() typeset -a zsh_highlight_caches; zsh_highlight_caches=() _zsh_highlight-zle-buffer() { + if (( PENDING )); then + return + fi + local ret=$? { local -a funinds