Browse Source

check KEYS_QUEUED_COUNT and PENDING to skip parsing when pasting

pull/855/head
Daniel Kuettel 3 years ago
committed by Matthew Martin
parent
commit
c7caf57ca8
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      zsh-syntax-highlighting.zsh

+ 2
- 1
zsh-syntax-highlighting.zsh View File

@ -219,7 +219,8 @@ _zsh_highlight()
[[ -n ${ZSH_HIGHLIGHT_MAXLENGTH:-} ]] && [[ $#BUFFER -gt $ZSH_HIGHLIGHT_MAXLENGTH ]] && return $ret [[ -n ${ZSH_HIGHLIGHT_MAXLENGTH:-} ]] && [[ $#BUFFER -gt $ZSH_HIGHLIGHT_MAXLENGTH ]] && return $ret
# Do not highlight if there are pending inputs (copy/paste). # Do not highlight if there are pending inputs (copy/paste).
[[ $PENDING -gt 0 ]] && return $ret
(( KEYS_QUEUED_COUNT > 0 )) && return $ret
(( PENDING > 0 )) && return $ret
{ {
local cache_place local cache_place

Loading…
Cancel
Save