diff options
Diffstat (limited to 'Src/Zle')
-rw-r--r-- | Src/Zle/zle_tricky.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |