From fa50c700002bb5904a814004e8435103406dc654 Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Mon, 22 May 2000 12:14:37 +0000 Subject: fix for clines in suffix (11496) --- ChangeLog | 2 ++ Completion/Core/_main_complete | 2 +- Src/Zle/compmatch.c | 11 ++++++++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index dedfe7a79..2271fef02 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2000-05-22 Sven Wischnowsky + * 11496: Src/Zle/compmatch.c: fix for clines in suffix + * 11493: Completion/Core/_main_complete, Doc/Zsh/compwid.yo, Src/Zle/compcore.c, Src/Zle/zle_tricky.c: be more careful when decided if to insert tabs instead of completing diff --git a/Completion/Core/_main_complete b/Completion/Core/_main_complete index 636098c04..260e5b63f 100644 --- a/Completion/Core/_main_complete +++ b/Completion/Core/_main_complete @@ -185,7 +185,7 @@ if [[ $compstate[old_list] = keep || nm -gt 1 ]]; then compstate[insert]=unambiguous fi fi - +set -x if [[ "$compstate[insert]" = *menu* ]]; then if [[ -n "$_menu_style[(r)no-select*]" ]]; then unset MENUSELECT diff --git a/Src/Zle/compmatch.c b/Src/Zle/compmatch.c index 884946b97..33b5b8a40 100644 --- a/Src/Zle/compmatch.c +++ b/Src/Zle/compmatch.c @@ -378,9 +378,14 @@ add_match_part(Cmatcher m, char *l, char *w, int wl, matchsubs = matchlastsub = NULL; } /* Store the arguments in the last part-cline. */ - lp->line = l; lp->llen = wl; - lp->word = w; lp->wlen = wl; - lp->orig = o; lp->olen = ol; + if (lp->llen || lp->wlen) { + lp->next = get_cline(l, wl, w, wl, o, ol, CLF_NEW); + lp = lp->next; + } else { + lp->line = l; lp->llen = wl; + lp->word = w; lp->wlen = wl; + lp->orig = o; lp->olen = ol; + } if (o || ol) lp->flags &= ~CLF_NEW; -- cgit 1.4.1