diff options
Diffstat (limited to 'Src')
-rw-r--r-- | Src/Zle/compcore.c | 13 | ||||
-rw-r--r-- | Src/Zle/complist.c | 10 | ||||
-rw-r--r-- | Src/Zle/zle_tricky.c | 8 |
3 files changed, 19 insertions, 12 deletions
diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c index 94f441229..ad048718d 100644 --- a/Src/Zle/compcore.c +++ b/Src/Zle/compcore.c @@ -500,16 +500,17 @@ before_complete(Hookdef dummy, int *lst) /**/ int -after_complete(Hookdef dummy, Compldat dat) +after_complete(Hookdef dummy, int *dat) { if (menucmp && !oldmenucmp) { - struct chdata dat; + struct chdata cdat; int ret; - dat.matches = amatches; - dat.num = nmatches; - dat.cur = NULL; - if ((ret = runhookdef(MENUSTARTHOOK, (void *) &dat))) { + cdat.matches = amatches; + cdat.num = nmatches; + cdat.cur = NULL; + if ((ret = runhookdef(MENUSTARTHOOK, (void *) &cdat))) { + dat[1] = 0; menucmp = menuacc = 0; if (ret == 2) { fixsuffix(); diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c index 2f7873d63..622219aaf 100644 --- a/Src/Zle/complist.c +++ b/Src/Zle/complist.c @@ -1624,7 +1624,7 @@ domenuselect(Hookdef dummy, Chdata dat) Thingy cmd; Menustack u = NULL; int i = 0, acc = 0, wishcol = 0, setwish = 0, oe = onlyexpl, wasnext = 0; - int space, lbeg = 0, step = 1, wrap, pl = nlnct, broken = 0; + int space, lbeg = 0, step = 1, wrap, pl = nlnct, broken = 0, first = 1; char *s; if (fdat || (dummy && (!(s = getsparam("MENUSELECT")) || @@ -1712,6 +1712,9 @@ domenuselect(Hookdef dummy, Chdata dat) lbeg = mlbeg; onlyexpl = 0; showinglist = -2; + if (first && !listshown && isset(LISTBEEP)) + zbeep(); + first = 0; zrefresh(); inselect = 1; if (noselect) { @@ -1745,9 +1748,10 @@ domenuselect(Hookdef dummy, Chdata dat) getk: - if (!(cmd = getkeycmd()) || cmd == Th(z_sendbreak)) + if (!(cmd = getkeycmd()) || cmd == Th(z_sendbreak)) { + zbeep(); break; - else if (cmd == Th(z_acceptline)) { + } else if (cmd == Th(z_acceptline)) { acc = 1; break; } else if (cmd == Th(z_acceptandinfernexthistory)) { diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c index beed90704..fcbe9404c 100644 --- a/Src/Zle/zle_tricky.c +++ b/Src/Zle/zle_tricky.c @@ -536,7 +536,7 @@ static int docomplete(int lst) { char *s, *ol; - int olst = lst, chl = 0, ne = noerrs, ocs, ret = 0; + int olst = lst, chl = 0, ne = noerrs, ocs, ret = 0, dat[2]; if (undoing) setlastline(); @@ -777,9 +777,11 @@ docomplete(int lst) zsfree(qword); unmetafy_line(); - runhookdef(AFTERCOMPLETEHOOK, (void *) &lst); + dat[0] = lst; + dat[1] = ret; + runhookdef(AFTERCOMPLETEHOOK, (void *) dat); - return ret; + return dat[1]; } /* 1 if we are completing the prefix */ |