jed-users mailing list

[2004 Date Index] [2004 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: regexp-replace bug (was: pre-release version of 0.99-17 available)


It seems the random bytes in the replace_match function only occur in
backsubstitutions, and when the same backsubstitutions appears twice in a
replacement (say, "\1\1") it does not give the same random byte twice.  It
must be some bug in jed_insert_nbytes().  Whatever it is, this patch seems
to fix it.

--- search.c	Fri Jun 11 21:15:36 2004
+++ search.c	Sat Jul  3 19:33:27 2004
@@ -493,7 +493,7 @@
 	while (n < nmax)
 	  {
 	     p = CLine->data + reg.offset;
-	     (void) jed_insert_nbytes ((p + n), 1);
+	     (void) _jed_ins_byte (*(p + n));
 	     n++;
 	  }
      }

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2004 date index] [2004 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]