Just upgraded from 3.96t-beta2 to 3.97. I was about to report a bug and realized that I needed the upgrade, but it appears that the bug is still there. I wonder if maybe I've got a faulty setting somewhere? At any rate, here it is:
I have a few lines of code that I need to a quick search'n'replace on. But only a few of those lines, so I hit F6, change the Find/Replace values, select "Marked text only" and instead of doing "Replace All" (which works, BTW) I did a Find (I never know if that works since the found text is highlighted the same as the marked text), then Replace, and it replaces *ALL* the marked text. Not exactly what I wanted.
Any suggestions?
Thanks,
Alan Stewart
Zeus 3.97
-
- Posts: 83
- Joined: Fri Jun 02, 2006 6:52 pm
-
- Posts: 83
- Joined: Fri Jun 02, 2006 6:52 pm
Example
It's pretty much as I explained it.
1) Start with a buncha lines:
"1"
"12"
"123"
"1234"
"12345"
"123456"
2) Higlight a few in the middle (the middle 4).
3) Search'n'Replace (F6 in Brief).
Find: 2
Replace with: george
[x] Repeat find on replace
(o) Marked text only
4) Alt-F to Find
5) Alt-R to Replace
6) Result is:
"1"
"1234george56"
...
Hmm, okay, I see your point. It looks like things are even more messed up that just the first '2' being replaced. I *think* it's also dependent on where the cursor is when the marking is done. Somehow the cursor needs to be moved to the beginning of the marked block before the first "Find" is done.
Hope that helps!
1) Start with a buncha lines:
"1"
"12"
"123"
"1234"
"12345"
"123456"
2) Higlight a few in the middle (the middle 4).
3) Search'n'Replace (F6 in Brief).
Find: 2
Replace with: george
[x] Repeat find on replace
(o) Marked text only
4) Alt-F to Find
5) Alt-R to Replace
6) Result is:
"1"
"1234george56"
...
Hmm, okay, I see your point. It looks like things are even more messed up that just the first '2' being replaced. I *think* it's also dependent on where the cursor is when the marking is done. Somehow the cursor needs to be moved to the beginning of the marked block before the first "Find" is done.
Hope that helps!