'Wrap searches' option for Replace function

Ideas for new features

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
Eelis
Posts: 5
Joined: Fri Jul 04, 2003 5:10 pm

'Wrap searches' option for Replace function

Post 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? :-)
baest
Posts: 3
Joined: Tue Jun 10, 2003 4:18 pm

RE 'Wrap searches' option for Replace function

Post 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...
Eelis
Posts: 5
Joined: Fri Jul 04, 2003 5:10 pm

Re: RE 'Wrap searches' option for Replace function

Post 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.
SpyGuy
Posts: 6
Joined: Fri Jun 25, 2004 11:24 am

Post 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.
SpyGuy
Posts: 6
Joined: Fri Jun 25, 2004 11:24 am

Post 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
User avatar
gracefool
Posts: 76
Joined: Thu Jan 29, 2004 7:21 am
Location: Wellington, New Zealand
Contact:

Post by gracefool »

This is part of the Grand Unification Theory.
Post Reply