mirror of
https://github.com/dcarrillo/prezto.git
synced 2024-12-23 10:18:00 +00:00
Retain search query highlight on cursor move
@guidovansteen discovered inconsistent behaviour when zsh-syntax-highlighting is not sourced prior to zsh-history-substring-search. https://github.com/zsh-users/zsh-history-substring-search/issues/9 @sunaku wrote this patch.
This commit is contained in:
parent
11d5792243
commit
04c3df512a
@ -89,11 +89,14 @@ zmodload -F zsh/parameter
|
|||||||
#
|
#
|
||||||
if [[ $+functions[_zsh_highlight] -eq 0 ]]; then
|
if [[ $+functions[_zsh_highlight] -eq 0 ]]; then
|
||||||
#
|
#
|
||||||
# Dummy implementation of _zsh_highlight()
|
# Dummy implementation of _zsh_highlight() that
|
||||||
# that simply removes existing highlights
|
# simply removes any existing highlights when the
|
||||||
|
# user inserts printable characters into $BUFFER.
|
||||||
#
|
#
|
||||||
function _zsh_highlight() {
|
function _zsh_highlight() {
|
||||||
region_highlight=()
|
if [[ $KEYS == [[:print:]] ]]; then
|
||||||
|
region_highlight=()
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user