summaryrefslogtreecommitdiff
path: root/plugins/zsh-navigation-tools/znt-history-widget
diff options
context:
space:
mode:
authorL.C. Karssen <lennart@karssen.org>2016-03-07 22:09:02 +0100
committerL.C. Karssen <lennart@karssen.org>2016-03-07 22:09:02 +0100
commitcfac963772718723589bf7293be0a53f79511b24 (patch)
tree1c0f680591d81ecfaff8932d07f8131f4a6fd45c /plugins/zsh-navigation-tools/znt-history-widget
parent0a47451a462284d20c633a7d6b3431a71bf65759 (diff)
parentbd6dbd1d9b1fc8a523aaf588492eb3ed4113b49d (diff)
downloadzsh-cfac963772718723589bf7293be0a53f79511b24.tar.gz
zsh-cfac963772718723589bf7293be0a53f79511b24.tar.bz2
zsh-cfac963772718723589bf7293be0a53f79511b24.zip
Merge branch 'master' of git://github.com/robbyrussell/oh-my-zsh
Diffstat (limited to 'plugins/zsh-navigation-tools/znt-history-widget')
-rw-r--r--plugins/zsh-navigation-tools/znt-history-widget6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/zsh-navigation-tools/znt-history-widget b/plugins/zsh-navigation-tools/znt-history-widget
index 9ddae606d..a4a26cbfc 100644
--- a/plugins/zsh-navigation-tools/znt-history-widget
+++ b/plugins/zsh-navigation-tools/znt-history-widget
@@ -1,7 +1,11 @@
autoload znt-usetty-wrapper n-history
local NLIST_START_IN_SEARCH_MODE=1
local NLIST_START_IN_UNIQ_MODE=1
-local NLIST_SET_SEARCH_TO="$BUFFER"
+
+# Only if current $BUFFER doesn't come from history
+if [ "$HISTCMD" = "$HISTNO" ]; then
+ local NLIST_SET_SEARCH_TO="$BUFFER"
+fi
znt-usetty-wrapper n-history "$@"