Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug w/matching control
- X-seq: zsh-workers 13575
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: Bug w/matching control
- Date: Tue, 6 Mar 2001 12:29:22 +0100 (MET)
- In-reply-to: Felix Rosencrantz's message of Mon, 5 Mar 2001 20:54:31 -0800 (PST)
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
Felix Rosencrantz wrote:
> Thanks, Sven, that seems to fix the problem with the characters being deleted,
> but the insert positions are different than the other case, they should be
> 9:27, there seems to be an extra 11 in there.
>
> When I run with the patch I sent before I'm getting a diff for
> line: {tst glibc}{-2.1.94-3.i386.rpm}
> COMPADD:{}
> ! INSERT_POSITIONS:{9:11:27}
Ah, right. Better reset the CLF_MISS flag if it's in the wrong cline
struct.
Bye
Sven
Index: Src/Zle/compmatch.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/compmatch.c,v
retrieving revision 1.32
diff -u -r1.32 compmatch.c
--- Src/Zle/compmatch.c 2001/03/05 10:48:11 1.32
+++ Src/Zle/compmatch.c 2001/03/06 11:29:06
@@ -1923,7 +1923,10 @@
((tn->flags & CLF_NEW) || !cmp_anchors(o, tn, 0));
t = tn);
if (tn) {
+ int of = o->flags & CLF_MISS;
+
diff = sub_join(o, n, tn, 0);
+ o->flags = (o->flags & ~CLF_MISS) | of;
if (po && po->prefix && cmp_anchors(n, pn, 0)) {
po->flags |= CLF_MISS;
@@ -2069,7 +2072,10 @@
cmp_anchors(tn, o, 1)) break;
if (tn) {
+ int of = o->flags & CLF_MISS;
+
if ((diff = sub_join(o, n, tn, 0))) {
+ o->flags = (o->flags & ~CLF_MISS) | of;
if (po) {
po->flags |= CLF_MISS;
po->max += diff;
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author