Page 1 of 1

'Wrap searches' option for Replace function

Posted: Fri Jul 04, 2003 5:21 pm
by Eelis
The Find dialog has a very useful option named 'Wrap searches'. I think this option would also make sense (and be useful) in the Replace dialog because it has a 'Find next' button. Sounds reasonable don't you agree? :-)

RE 'Wrap searches' option for Replace function

Posted: Sun Jul 06, 2003 10:05 am
by baest
You can't have wrapped replaces on many replaces because a allready replaced item could be replaced again if you e.g. want to put some text in front of some other text. In this case you'll have an infinite loop. I could be of some use in Find next mode, but you can just start at the beginning off the file or start the replace again...

Re: RE 'Wrap searches' option for Replace function

Posted: Sun Jul 06, 2003 4:34 pm
by Eelis
baest wrote:You can't have wrapped replaces on many replaces because a allready replaced item could be replaced again if you e.g. want to put some text in front of some other text. In this case you'll have an infinite loop.
The wrapping could be limited to one full document search, stopping at the starting point. For example, this is what Adobe Reader does.
baest wrote:I could be of some use in Find next mode, but you can just start at the beginning off the file or start the replace again...
Obviously there are workarounds, but I think it would be nice if no workaround was nescessary.

Posted: Fri Jun 25, 2004 7:40 pm
by SpyGuy
I agree with the need for a "wrap" option on replacements. Just have the operation automatically pop up a modal warning when you've reached the starting point (OK continues the replace operation; Cancel stops it).

Basically, this is not significantly different than using the "Replace All" option except it allows you incremental control over each replacement operation.

Posted: Fri Jun 25, 2004 8:06 pm
by SpyGuy
I was just rethinking this issue and Baest is wrong about the infinite loop: an infinite loop could only occur in a "Replace All" type operation (and that has already been taken care of by the fine folks at TextPad).

Setting a wrap option on in the Replace dialog would only apply to "Find Next" and "Replace Next". In both those cases, the user is in control of each find/replace operation. Therefore there could never be an infinite loop (unless someone wants to keep pushing the button perpetually). Therefore there is no need for a modal warning box. But it would be very helpful if TextPad played an audio cue when the wrapped replace operation reaches its starting point:

http://textpad.com/forum/viewtopic.php?t=5541

Posted: Thu Jul 08, 2004 12:07 am
by gracefool
This is part of the Grand Unification Theory.