Quieten non-zero commands reported by err trap.
This commit is contained in:
parent
094329eb14
commit
b267c7b4e7
@ -95,7 +95,7 @@ _zsh_highlight_main_add_region_highlight() {
|
|||||||
|
|
||||||
# The calculation was relative to $PREBUFFER$BUFFER, but region_highlight is
|
# The calculation was relative to $PREBUFFER$BUFFER, but region_highlight is
|
||||||
# relative to $BUFFER.
|
# relative to $BUFFER.
|
||||||
(( start -= $#PREBUFFER ))
|
(( start -= $#PREBUFFER )) || :
|
||||||
(( end -= $#PREBUFFER ))
|
(( end -= $#PREBUFFER ))
|
||||||
|
|
||||||
(( end < 0 )) && return # having end<0 would be a bug
|
(( end < 0 )) && return # having end<0 would be a bug
|
||||||
@ -384,7 +384,7 @@ _zsh_highlight_highlighter_main_paint()
|
|||||||
else
|
else
|
||||||
integer offset=0
|
integer offset=0
|
||||||
fi
|
fi
|
||||||
((start_pos+=offset))
|
((start_pos+=offset)) || :
|
||||||
((end_pos=$start_pos+${#arg}))
|
((end_pos=$start_pos+${#arg}))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -65,8 +65,11 @@ _zsh_highlight()
|
|||||||
return $ret
|
return $ret
|
||||||
fi
|
fi
|
||||||
|
|
||||||
setopt localoptions warncreateglobal
|
# Did a couple of tweaks to highlighters/main/main-highlighter.zsh
|
||||||
setopt localoptions noksharrays
|
# to prevent need for following, thut there'll surely be others.
|
||||||
|
# setopt localtraps
|
||||||
|
# unfunction TRAPZERR
|
||||||
|
setopt localoptions noksharrays warncreateglobal
|
||||||
local REPLY # don't leak $REPLY into global scope
|
local REPLY # don't leak $REPLY into global scope
|
||||||
|
|
||||||
# Do not highlight if there are more than 300 chars in the buffer. It's most
|
# Do not highlight if there are more than 300 chars in the buffer. It's most
|
||||||
|
Loading…
x
Reference in New Issue
Block a user