keep highlights when moving cursor within $BUFFER
This commit is contained in:
parent
2f0b0c6a5d
commit
53b70a0b82
1 changed files with 6 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue