Remove unnecessary self-insert override, close #20

@sunaku experimented and found that highlights are removed on
space bar and printable character key presses making the removed
code unnecessary.

See https://github.com/zsh-users/zsh-history-substring-search/issues/8
for more information.
This commit is contained in:
Sorin Ionescu 2012-03-12 19:57:18 -04:00
parent 01d9ec13d8
commit 158990e5cf

View File

@ -96,18 +96,6 @@ if [[ $+functions[_zsh_highlight] -eq 0 ]]; then
region_highlight=() region_highlight=()
} }
#
# Remove existing highlights when the user
# inserts printable characters into $BUFFER
#
function ordinary-key-press() {
if [[ $KEYS == [[:print:]] ]]; then
region_highlight=()
fi
zle .self-insert
}
zle -N self-insert ordinary-key-press
# #
# The following snippet was taken from the zsh-syntax-highlighting project: # The following snippet was taken from the zsh-syntax-highlighting project:
# #