Skip to content

Commit c7caf57

Browse files
dkuettelphy1729
authored andcommitted
check KEYS_QUEUED_COUNT and PENDING to skip parsing when pasting
1 parent 1a9264b commit c7caf57

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

zsh-syntax-highlighting.zsh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,8 @@ _zsh_highlight()
219219
[[ -n ${ZSH_HIGHLIGHT_MAXLENGTH:-} ]] && [[ $#BUFFER -gt $ZSH_HIGHLIGHT_MAXLENGTH ]] && return $ret
220220

221221
# Do not highlight if there are pending inputs (copy/paste).
222-
[[ $PENDING -gt 0 ]] && return $ret
222+
(( KEYS_QUEUED_COUNT > 0 )) && return $ret
223+
(( PENDING > 0 )) && return $ret
223224

224225
{
225226
local cache_place

0 commit comments

Comments
 (0)