diff options
author | Marc Cornellà <marc.cornella@live.com> | 2016-01-18 15:16:48 +0100 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2016-01-18 15:16:48 +0100 |
commit | 40016afdc4c4ecdab6092e4f8c5c8648e27e5524 (patch) | |
tree | 950eba1cf043e27a8c140962a6a432aed717a058 /plugins/zsh-navigation-tools/znt-history-widget | |
parent | 87e782f91e5c8fb3c33b58cdda265e65122a2520 (diff) | |
parent | 77f93f61c5ee6fea9131a1791bd3b106b4b8da4f (diff) | |
download | zsh-40016afdc4c4ecdab6092e4f8c5c8648e27e5524.tar.gz zsh-40016afdc4c4ecdab6092e4f8c5c8648e27e5524.tar.bz2 zsh-40016afdc4c4ecdab6092e4f8c5c8648e27e5524.zip |
Merge pull request #4755 from psprint/master
znt: optimizations for zsh<=5.2
Diffstat (limited to 'plugins/zsh-navigation-tools/znt-history-widget')
-rw-r--r-- | plugins/zsh-navigation-tools/znt-history-widget | 6 |
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 "$@" |