Page 1 of 1

Find next without find dialog

Posted: Fri Dec 03, 2004 9:47 am
by bveldkamp
When you select some text and press F3 (find next), TextPad searches for the selected text, even when the find dialog is not open. But if "Regular expression" happens to be checked in the (closed) find dialog, that setting is used, sometimes leading to unexpected behaviour.

For example, if I select text containing a [ and press F3, I get the message "Unmatched '( or {'" (never mind it only mentions "(" and "{"). Now I have to open the find dialog to be able to uncheck RE.

My suggestion is this:
If I select text and press F3, ignore the setting for Regular expression.
If text is selected as a result of a previous Find, use the same settings for "Find next".

Posted: Fri Dec 03, 2004 12:04 pm
by ben_josephs
I also find this irritating, and would like the default behaviour changed. But there should remain a way to choose to have the selected text interpreted as a regex, for the case where you're constructing a fancy one that needs repeated tweaking in a proper editor window rather than in the nasty Find what text box. I've got into the habit of typing F5 when I do this to check which search mode I'm in if I'm not sure. The type of search you are about to execute depends on what you've just selected, not on what you happen to have searched for last, possibly last week. And, of course, hidden modes are always a Bad Thing.

A related thing: I treat plain searches and regex ones as quite distinct things. So I've mapped four keyboard shortcuts to four scripts for an external key-stuffing tool that open the Find and Replace dialogue boxes in plain or regex mode.

Posted: Fri Dec 03, 2004 12:21 pm
by bveldkamp
ben_josephs wrote:But there should remain a way to choose to have the selected text interpreted as a regex, for the case where you're constructing a fancy one that needs repeated tweaking in a proper editor window rather than in the nasty Find what text box.
Never thought of that, maybe you could post this to the "Tips" forum?

Posted: Tue Dec 07, 2004 8:09 pm
by ben_josephs
Well, it's just using a text editor to edit text. :-) Feel free to repost it as a tip.