From 158990e5cfa0e862ddc663810fab0619a3bef985 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Mon, 12 Mar 2012 19:57:18 -0400 Subject: [PATCH] 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. --- .../history-substring-search.zsh | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/plugins/history-substring-search/history-substring-search.zsh b/plugins/history-substring-search/history-substring-search.zsh index d0854b1..bcf983c 100644 --- a/plugins/history-substring-search/history-substring-search.zsh +++ b/plugins/history-substring-search/history-substring-search.zsh @@ -96,18 +96,6 @@ if [[ $+functions[_zsh_highlight] -eq 0 ]]; then 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: #