소스 검색

Don't highlight if buffer is longer than $ZSH_HIGHLIGHT_MAXLENGTH

pull/64/head
Valodim 13 년 전
부모
커밋
5f68accccf
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. +4
    -0
      zsh-syntax-highlighting.zsh

+ 4
- 0
zsh-syntax-highlighting.zsh 파일 보기

@ -47,6 +47,10 @@ _zsh_highlight()
# Store the previous command return code to restore it whatever happens.
local ret=$?
# Do not highlight if there are more than 300 chars in the buffer. It's most
# likely a pasted command or a huge list of files in that case..
[[ -n $ZSH_HIGHLIGHT_MAXLENGTH ]] && [[ $#BUFFER -gt $ZSH_HIGHLIGHT_MAXLENGTH ]] && return $ret
# Do not highlight if there are pending inputs (copy/paste).
[[ $PENDING -gt 0 ]] && return $ret

불러오는 중...
취소
저장