about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-09-23 13:12:44 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-09-23 13:12:44 +0000
commit679eca13696bf626db9283bff462ee80de1efa88 (patch)
tree7d07e43b40a268f7a1075c3a6c1edc3f54e42bf4
parentd293470f7aa3612420f0d090df080ecef1d934a8 (diff)
downloadzsh-679eca13696bf626db9283bff462ee80de1efa88.tar.gz
zsh-679eca13696bf626db9283bff462ee80de1efa88.tar.xz
zsh-679eca13696bf626db9283bff462ee80de1efa88.zip
zsh-workers/8015
-rw-r--r--Completion/Commands/_history_complete_word2
-rw-r--r--Src/Zle/zle_tricky.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/Completion/Commands/_history_complete_word b/Completion/Commands/_history_complete_word
index 99be0017e..f459046d2 100644
--- a/Completion/Commands/_history_complete_word
+++ b/Completion/Commands/_history_complete_word
@@ -23,8 +23,8 @@ else
     _description -V expl 'history word'
   fi
   compgen "$expl[@]" -Q -H 0 ''
-  compstate[insert]=1
   if [[ -n "$compconfig[history_stop]" ]]; then
+    compstate[insert]=1
     _hist_menu_length="$compstate[nmatches]"
     _hist_menu_end=''
   fi
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c
index e3b503265..d77301517 100644
--- a/Src/Zle/zle_tricky.c
+++ b/Src/Zle/zle_tricky.c
@@ -6932,7 +6932,7 @@ makecomplistflags(Compctl cc, char *s, int incmd, int compadd)
 	/* Now search the history. */
 	while (n-- && he) {
 	    int iwords;
-	    for (iwords = 0; iwords < he->nwords; iwords++) {
+	    for (iwords = he->nwords - 1; iwords >= 0; iwords--) {
 		h = he->text + he->words[iwords*2];
 		e = he->text + he->words[iwords*2+1];
 		hpatsav = *e;