[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Curious bug in ZMACS
I came across the following curious bug in c-S in ZMACS recently, but I haven't yet had time
to look at ZWEI:COM-INCREMENTAL-SEARCH to see what is going on. I would be interested in
hearing if anyone has come across this before. It occurs in all the world loads that we
have here (Generas 7.1 through 8.0.1); does anyone have an earlier world load they could
try it out on?
Get into an empty ZMACS buffer and type the following (all of the following
are single key strokes):
Return
a
c-6
c-4
Return
a
Return
a
In other words, your buffer contains a blank line, the letter "a" on its own line,
63 more blank lines, another letter "a" on its own line, and a final letter "a" on
its own line.
Now go to the start of the buffer (m-<) and type
c-S
Return
a
I.e., search for a letter "a" at the start of a line. The cursor should stop after
the "a" on the second line. Now search again by typing c-S. This time, the cursor
should stop after the third (final) letter "a", 1not0 after the second. If you delete
or add a blank line within the block of 63 blank lines, then the search will stop
where it should, after the second letter "a".
The bug is only sensitive to the number of lines between the first and second occurrences
of the search string, which must start with a #\Return. It appears when the number of
lines is (- (expt 2 n) 1), where n6. The lines do not have to be blank. It does not
matter what is outside of the (+ (expt 2 n) 1) line block.
David Bushnell
bushnell@eos.arc.nasa.gov