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
|
||||
# relative to $BUFFER.
|
||||
(( start -= $#PREBUFFER ))
|
||||
(( start -= $#PREBUFFER )) || :
|
||||
(( end -= $#PREBUFFER ))
|
||||
|
||||
(( end < 0 )) && return # having end<0 would be a bug
|
||||
@ -384,7 +384,7 @@ _zsh_highlight_highlighter_main_paint()
|
||||
else
|
||||
integer offset=0
|
||||
fi
|
||||
((start_pos+=offset))
|
||||
((start_pos+=offset)) || :
|
||||
((end_pos=$start_pos+${#arg}))
|
||||
fi
|
||||
|
||||
|
@ -65,8 +65,11 @@ _zsh_highlight()
|
||||
return $ret
|
||||
fi
|
||||
|
||||
setopt localoptions warncreateglobal
|
||||
setopt localoptions noksharrays
|
||||
# Did a couple of tweaks to highlighters/main/main-highlighter.zsh
|
||||
# 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
|
||||
|
||||
# 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