Closed
Bug 67256
Opened 24 years ago
Closed 24 years ago
ReplaceAll with WrapAround should stop replacing before passing initial caret position
Categories
(Core :: DOM: Editor, defect, P3)
Tracking
()
VERIFIED
FIXED
mozilla0.8
People
(Reporter: kinmoz, Assigned: kinmoz)
Details
Attachments
(2 files)
4.90 KB,
patch
|
Details | Diff | Splinter Review | |
457 bytes,
text/html
|
Details |
Start up a blank composer and type in the following:
foo foo
foo foo
Now place your caret on the first line just after the first "foo".
Bring up the replace dialog (Edit->Replace...) and enter "foo" (without the
quotes) as the string to find and "food" (without the quotes) as the word to
replace with, and make sure the "Wrap Around" checkbox is checked.
Now hit the ReplaceAll button. When it's done, you'll notice that you end up with:
food foodd
food food
You should've ended up with:
food food
food food
The patch I just attatched actually fixes 3 problems.
1. GetCurrentBlockIndex() was returning the wrong block number.
2. We now only call GetCurrentBlockIndex() if we're doing wrap around.
3. Prevents ReplaceAll from going past the initial caret position once we've
wrapped.
Status: NEW → ASSIGNED
Priority: -- → P3
Whiteboard: FIX IN HAND, needs review
Target Milestone: --- → mozilla0.8
Comment 3•24 years ago
|
||
sr=sfraser
Just got an r=akkana. Will check in when the tree opens.
Whiteboard: FIX IN HAND, needs review → FIX IN HAND
Fix checked into TRUNK:
mozilla/editor/txtsvc/src/nsFindAndReplace.cpp revision 1.2
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Whiteboard: FIX IN HAND
Sujay, I just attatched the simple test case I was using to test
Find/Replace/ReplaceAll with.
Try doing a ReplaceAll (forwards and backwards) with WrapAround on with the
caret placed in various positions:
1. At the start of the (first/middle/last) line in the doc
2. At the end of the (first/middle/last)line in the doc
3. in the middle of a word on the (first/middle/last)line in the doc
etc.
Updated•24 years ago
|
Status: RESOLVED → VERIFIED
Comment 8•24 years ago
|
||
Verified on 8-28 build
You need to log in
before you can comment on or make changes to this bug.
Description
•