mirror of
https://github.com/zsh-users/zsh-history-substring-search.git
synced 2026-11-10 03:11:48 -05:00
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:
@@ -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 "\\\("
|
||||
|
||||
Reference in New Issue
Block a user