[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nano-devel] Search-and-replace bugs.

From: David Benbennick
Subject: [Nano-devel] Search-and-replace bugs.
Date: Sat, 25 Jan 2003 22:25:35 -0500
User-agent: Mutt/

This patch is longer than the last three; sorry.  It replaces about 30
contiguous buggy lines in do_replace_loop().

First, make a file whose first two lines look like


I.e. the first line is blank.  Put the cursor at the top of the file, and
do a Regexp search for "(bob)", replace with "\1\1\1".  At the prompt,
type A for all.  Nano is in an infinite loop!

Second, with the word AAAAAAAA, doing backwards search on the letter A,
replace with anything, only alternating As get replaced.

Third, do_replace_loop now properly updates the mark.  Try setting the
mark at the end of a line, then replace most of that line with blank. 
When you cut, Nano crashes.

Finally, make the line
and put the cursor on the g.  Search for "abcdef", replace with blank
string.  The cursor has moved past the g.

Attachment: replace.patch
Description: Text document

Attachment: pgp8VKFQbQlzm.pgp
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]