From 7f7497c531841c7fa53bfa2618c7d5592abddfda Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Thu, 2 Dec 1999 11:32:09 +0000 Subject: zsh-workers/8851 --- Src/Zle/compcore.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Src/Zle/compcore.c') diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c index 875674023..1bc1fd86f 100644 --- a/Src/Zle/compcore.c +++ b/Src/Zle/compcore.c @@ -445,9 +445,8 @@ before_complete(Hookdef dummy, int *lst) /* We may have to reset the cursor to its position after the * * string inserted by the last completion. */ - if (fromcomp & FC_INWORD) - if ((cs = lastend) > ll) - cs = ll; + if ((fromcomp & FC_INWORD) && (cs = lastend) > ll) + cs = ll; /* Check if we have to start a menu-completion (via automenu). */ @@ -2512,6 +2511,7 @@ permmatches(int last) n->mcount = g->mcount; n->matches = p = (Cmatch *) ncalloc((n->mcount + 1) * sizeof(Cmatch)); + n->name = ztrdup(g->name); for (q = g->matches; *q; q++, p++) *p = dupmatch(*q, nbrbeg, nbrend); *p = NULL; @@ -2609,6 +2609,7 @@ freematches(Cmgroup g) } free(g->expls); } + zsfree(g->name); free(g); g = n; -- cgit 1.4.1