Closed Bug 116405 Opened 23 years ago Closed 23 years ago

Need to hit Replace All twice when doing a backwards search

Categories

(SeaMonkey :: Composer, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.0

People

(Reporter: jfarrell, Assigned: akkzilla)

References

()

Details

Attachments

(1 file, 1 obsolete file)

From Bugzilla Helper: User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0) BuildID: 20011205 While running the "replace all" part of the fillowing test: http://www.mozilla.org/quality/browser/front-end/testcases/composer/composer- find-replace.html I had to hit "Replace All" twice in order to replace everything in the document when doing a Search Backwards Reproducible: Always Steps to Reproduce: 1. Enter the following lines in Composer: The the Theory theory why The 2. From the beginning of the doc, Select Edit|Find Replace and checkoff the "Match upper/lower case" box and enter "The" for the Find, and enter "Sam" for the Replace with. Hit "Replace All" 3. You should now see: Sam the Samory theory why Sam 4. Now click on the search backwards box and change the Find field to "Sam" and the Replace with field to "The". Hit "Replace All" Actual Results: on the backwards search, only the last occurance is replaced when you hit replace all. You need to click replace all again to get the' rest changed. Expected Results: All occurances should be changed. I reproduced this on OpenVMS as well as on a Linux box I have.
-->Akkana for triage
Assignee: syd → akkana
The find/replace code is about to change, so I'm adding a dependency on those bugs. Will look at this one when those are in.
Depends on: 80805, 97157
New find/replace is in now ... and testing this bug, it turns out that we're not doing the right thing in the case of reverse find with wraparound. We don't show the particular problem that the old find showed, but we do have other problems (like, it doesn't wrap, and can hang if the replacement string will match the match pattern, e.g. replace a with aa). Confirming/accepting this bug so that I can attach my patch for those problems.
Severity: minor → normal
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Target Milestone: --- → mozilla1.0
Attached patch Fix problems with replace reverse/wrapped (obsolete) (deleted) — Splinter Review
This patch sets the start/end points of the searches correctly for the reverse case if reverse is checked.
Attached patch Delete unused variable (deleted) — Splinter Review
Jfrancis noticed that startPt wasn't being used any more and so should be deleted.
Attachment #74492 - Attachment is obsolete: true
Comment on attachment 74828 [details] [diff] [review] Delete unused variable dont see any other probs.
Attachment #74828 - Flags: review+
Comment on attachment 74828 [details] [diff] [review] Delete unused variable sr=sfraser
Attachment #74828 - Flags: superreview+
Comment on attachment 74828 [details] [diff] [review] Delete unused variable a=asa (on behalf of drivers) for checkin to the 1.0 trunk
Attachment #74828 - Flags: approval+
Fixed.
Trying again to mark as fixed.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: