From 8bd881b7b6575f158e33722813b23891ddb46c34 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 21 Aug 2007 17:35:55 +0000 Subject: users/11790: avoid nounset --- ChangeLog | 5 +++++ Functions/Zle/down-line-or-beginning-search | 2 ++ Functions/Zle/up-line-or-beginning-search | 2 ++ 3 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index f197cc394..4737347d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-08-21 Peter Stephenson + + * users/11790: Functions/Zle/{up,down}-line-or-beginning-search: + emulate -L zsh to avoid nounset problem. + 2007-08-20 Peter Stephenson * 23784: Src/utils.c: Use $'\...' quoting for unparseable and diff --git a/Functions/Zle/down-line-or-beginning-search b/Functions/Zle/down-line-or-beginning-search index 8a8ed8994..fbd2c3341 100644 --- a/Functions/Zle/down-line-or-beginning-search +++ b/Functions/Zle/down-line-or-beginning-search @@ -1,6 +1,8 @@ # Like down-line-or-search, but uses the whole line prefix up to the # cursor position for searching forwards. +emulate -L zsh + if [[ ${+NUMERIC} -eq 0 && ( $LASTWIDGET = $__searching || $RBUFFER != *$'\n'* ) ]] then diff --git a/Functions/Zle/up-line-or-beginning-search b/Functions/Zle/up-line-or-beginning-search index 22d5183be..5348e7ad3 100644 --- a/Functions/Zle/up-line-or-beginning-search +++ b/Functions/Zle/up-line-or-beginning-search @@ -1,6 +1,8 @@ # Like up-line-or-search, but uses the whole line prefix up to the # cursor position for searching backwards. +emulate -L zsh + if [[ $LBUFFER == *$'\n'* ]]; then zle .up-line-or-history __searching='' -- cgit 1.4.1