diff options
Diffstat (limited to 'Src/Zle')
-rw-r--r-- | Src/Zle/compctl.c | 2 | ||||
-rw-r--r-- | Src/Zle/zle_main.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/Src/Zle/compctl.c b/Src/Zle/compctl.c index b443b7da5..0e1dc088c 100644 --- a/Src/Zle/compctl.c +++ b/Src/Zle/compctl.c @@ -3688,7 +3688,7 @@ makecomplistflags(Compctl cc, char *s, int incmd, int compadd) Patprog pprogc = NULL; char *e, *h, hpatsav; int i = addhistnum(curhist,-1,HIST_FOREIGN), n = cc->hnum; - Histent he = quietgethistent(i, GETHIST_UPWARD); + Histent he = gethistent(i, GETHIST_UPWARD); /* Parse the pattern, if it isn't the null string. */ if (*(cc->hpat)) { diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c index a19f9b5db..49b682c18 100644 --- a/Src/Zle/zle_main.c +++ b/Src/Zle/zle_main.c @@ -641,8 +641,11 @@ execzlefunc(Thingy func, char **args) if(!(wflags & ZLE_LASTCOL)) lastcol = -1; if (wflags & WIDGET_NCOMP) { + int atcurhist = histline == curhist; compwidget = w; ret = completecall(args); + if (atcurhist) + histline = curhist; } else ret = w->u.fn(args); if (!(wflags & ZLE_NOTCOMMAND)) |