Skip to content

Commit

Permalink
do nothing if PENDING inputs are exist
Browse files Browse the repository at this point in the history
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
nakamuray committed Mar 12, 2011
1 parent 19f1675 commit 0999ab0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions zsh-syntax-highlighting.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0999ab0

Please sign in to comment.