about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-22 12:14:37 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-22 12:14:37 +0000
commitfa50c700002bb5904a814004e8435103406dc654 (patch)
treec8baad793b43210f4c7655fc0f088368d67e9cbe /Src
parent91f40b975f17242cfcdb8b9b2166033b7f02f102 (diff)
downloadzsh-fa50c700002bb5904a814004e8435103406dc654.tar.gz
zsh-fa50c700002bb5904a814004e8435103406dc654.tar.xz
zsh-fa50c700002bb5904a814004e8435103406dc654.zip
fix for clines in suffix (11496)
Diffstat (limited to 'Src')
-rw-r--r--Src/Zle/compmatch.c11
1 files changed, 8 insertions, 3 deletions
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;