* Bug w/matching control
@ 2001-03-04 22:05 Felix Rosencrantz
0 siblings, 0 replies; 3+ messages in thread
From: Felix Rosencrantz @ 2001-03-04 22:05 UTC (permalink / raw)
To: zsh-workers
[-- Attachment #1: Type: text/plain, Size: 684 bytes --]
I'm seeing a problem with matching control and characters being deleted. I'm
using the data from workers/13320
I've attached a patch to 54compmatch. I think the output should be the same as
the previous testcase. Though this time with input of "g-2", we get a
"glibc-", with the 2 deleted. This isn't checked in, since it won't pass.
The actual output seen from the test is:
! line: {tst glibc}{-2.1.94-3.i386.rpm}
COMPADD:{}
! INSERT_POSITIONS:{9:27}
--- 1,3 ----
! line: {tst glibc-}{}
COMPADD:{}
! INSERT_POSITIONS:{10}
-FR
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/
[-- Attachment #2: test54.txt --]
[-- Type: text/plain, Size: 400 bytes --]
Index: 54compmatch.ztst
===================================================================
RCS file: /cvsroot/zsh/zsh/Test/54compmatch.ztst,v
retrieving revision 1.8
diff -r1.8 54compmatch.ztst
623a624,630
> test_code $workers_13320_matcher workers_13320_list
> comptest $'tst g-2\t'
> 0:Test from workers 13320
> >line: {tst glibc}{-2.1.94-3.i386.rpm}
> >COMPADD:{}
> >INSERT_POSITIONS:{9:27}
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Bug w/matching control
@ 2001-03-06 4:54 Felix Rosencrantz
0 siblings, 0 replies; 3+ messages in thread
From: Felix Rosencrantz @ 2001-03-06 4:54 UTC (permalink / raw)
To: zsh-workers
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}
-FR
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Bug w/matching control
@ 2001-03-06 11:29 Sven Wischnowsky
0 siblings, 0 replies; 3+ messages in thread
From: Sven Wischnowsky @ 2001-03-06 11:29 UTC (permalink / raw)
To: zsh-workers
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@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2001-03-06 11:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-04 22:05 Bug w/matching control Felix Rosencrantz
2001-03-06 4:54 Felix Rosencrantz
2001-03-06 11:29 Sven Wischnowsky
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).