diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-12-02 11:32:09 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-12-02 11:32:09 +0000 |
commit | 7f7497c531841c7fa53bfa2618c7d5592abddfda (patch) | |
tree | 37bc68e32ba11cd7123c42cd7f81ae9ec58c4953 /Src/Zle/compcore.c | |
parent | a4e44197ae0f6e237f118e5b30c01eb12c460ec4 (diff) | |
download | zsh-7f7497c531841c7fa53bfa2618c7d5592abddfda.tar.gz zsh-7f7497c531841c7fa53bfa2618c7d5592abddfda.tar.xz zsh-7f7497c531841c7fa53bfa2618c7d5592abddfda.zip |
zsh-workers/8851
Diffstat (limited to 'Src/Zle/compcore.c')
-rw-r--r-- | Src/Zle/compcore.c | 7 |
1 files changed, 4 insertions, 3 deletions
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; |