浏览代码

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

正在加载...
取消
保存