keep highlights when moving cursor within $BUFFER

This commit is contained in:
Guido van Steen 2011-06-14 12:54:55 -07:00 committed by Suraj N. Kurapati
parent 2f0b0c6a5d
commit 53b70a0b82

View file

@ -137,6 +137,12 @@ if [[ $+functions[_zsh_highlight] -eq 0 ]]; then
accept-and-menu-complete)
eval "$event() { builtin zle .$event && _zsh_highlight } ; zle -N $event"
;;
# The following widgets should NOT remove any previously
# applied highlighting. Therefore we do not remap them.
.forward-char|.backward-char|.up-line-or-history|.down-line-or-history)
;;
.*)
clean_event=$event[2,${#event}] # Remove the leading dot in the event name
case ${widgets[$clean_event]-} in