Permalink
Browse files

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.
  • Loading branch information...
1 parent 19f1675 commit 0999ab05bafe034fdcbca507f369b669a0b41d35 @nakamuray nakamuray committed Mar 12, 2011
Showing with 4 additions and 0 deletions.
  1. +4 −0 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

0 comments on commit 0999ab0

Please sign in to comment.