From 0334b4df7cfd728cd8b9480872fbbfcb6029d1e6 Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Wed, 28 Jun 2000 07:29:59 +0000 Subject: make a-a-i-n-h in menu selection work with one match; better undo behaviour for menu selection (12093) --- Src/Zle/complist.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Src/Zle/complist.c') diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c index 75a23f0e5..9159326f3 100644 --- a/Src/Zle/complist.c +++ b/Src/Zle/complist.c @@ -1782,11 +1782,15 @@ domenuselect(Hookdef dummy, Chdata dat) menucmp = menuacc = hasoldlist = 0; minfo.cur = NULL; fixsuffix(); + handleundo(); validlist = 0; amatches = pmatches = lastmatches = NULL; invalidate_list(); + iforcemenu = 1; menucomplete(zlenoargs); - if (dat->num < 2 || !minfo.cur || !*(minfo.cur)) { + iforcemenu = 0; + + if (dat->num < 1 || !minfo.cur || !*(minfo.cur)) { noselect = clearlist = listshown = 1; onlyexpl = 0; zrefresh(); @@ -1821,6 +1825,7 @@ domenuselect(Hookdef dummy, Chdata dat) s->origcs = origcs; s->origll = origll; accept_last(); + handleundo(); do_menucmp(0); mselect = (*(minfo.cur))->gnum; @@ -1852,6 +1857,7 @@ domenuselect(Hookdef dummy, Chdata dat) if (!u) break; + handleundo(); cs = 0; foredel(ll); spaceinline(l = strlen(u->line)); -- cgit 1.4.1