simplify last widget == current widget check

Restored from Peter Stephenson's original version of this plugin:
http://www.zsh.org/mla/users/2009/msg00818.html
This commit is contained in:
Suraj N. Kurapati
2011-06-09 00:10:28 -07:00
parent b8bb5bd8b0
commit dcd7cc6323
+1 -2
View File
@@ -47,8 +47,7 @@ history-substring-search-begin() {
setopt extendedglob
zmodload -i zsh/parameter
if [[ ! ( ( ${WIDGET/backward/forward} = ${LASTWIDGET/backward/forward}) ||
( ${WIDGET/forward/backward} = ${LASTWIDGET/forward/backward}) ) ]]; then
if [[ $LASTWIDGET != history-substring-search-* ]]; then
# $BUFFER contains the text that is in the command-line currently.
# we put an extra "\\" before meta characters such as "\(" and "\)",
# so that they become "\\\|" and "\\\("