F3 Search for Highlighted text

Find, replace, find in files, replace in files, regular expressions

F3 Search for Highlighted text

Postby CMBPM » Tue Mar 29, 2005 11:28 am

The configuration option on the Find tab - [x] Find Next/Prev finds selected text (not last searched for text) does not work. It will always finds the last searched for text.

Anyone have an idea how to get this to work? I use the Find Next/Prev from the toolbar all the time to look for strings.

Thanks.

MB
User avatar
CMBPM
Newbie
 
Posts: 2
Joined: Tue Mar 29, 2005 12:00 am

Re: F3 Search for Highlighted text

Postby ASTTMan » Tue Mar 29, 2005 1:44 pm

You might have Regular Expressions checked. It has to be unchecked on the Find dialog for Find Next/Previous to find the highlighted text.

Dave
User avatar
ASTTMan
Basic User
Basic User
 
Posts: 26
Joined: Fri Feb 18, 2005 12:00 am
Location: Arlington, TX

Re: F3 Search for Highlighted text

Postby CMBPM » Wed Mar 30, 2005 12:42 am

Thanks Dave.

Boy that's not intuitive. Any idea why that is?
User avatar
CMBPM
Newbie
 
Posts: 2
Joined: Tue Mar 29, 2005 12:00 am

Re: F3 Search for Highlighted text

Postby ASTTMan » Wed Mar 30, 2005 8:47 am

I'm not sure. The only thing I can think of is that if you're doing an RE search, you wouldn't want the Find Next/Prev to change the search to the last thing it found (highlighted text), you want it to continue using the RE. UE probably can't tell that you're finished with the RE search and now really want to use the highlighted text.

Obviously, it bit me once upon a time, too!

Dave
User avatar
ASTTMan
Basic User
Basic User
 
Posts: 26
Joined: Fri Feb 18, 2005 12:00 am
Location: Arlington, TX

Re: F3 Search for Highlighted text

Postby moosemanct » Tue Mar 14, 2006 6:09 pm

Unchecking "Regular Expressions" fixed it but I'm pretty sure I've always had that checked or at the very least it has been checked at least some of the time over the last 8 years I've used UE. I've never seen this problem before and I've always used search in this way. Am I just imagining that?

Thanks for your help!
User avatar
moosemanct
Newbie
 
Posts: 3
Joined: Tue Mar 14, 2006 12:00 am

Re: F3 Search for Highlighted text

Postby Bego » Tue Mar 14, 2006 7:41 pm

In the options-doalog under "search", you can specify if the highlighted text is the default search string - or not, as I suppose in your case.
Perhaps you toggled it ?

rds Bego
User avatar
Bego
Master
Master
 
Posts: 357
Joined: Wed Nov 24, 2004 12:00 am
Location: Germany

Re: F3 Search for Highlighted text

Postby moosemanct » Tue Mar 14, 2006 7:58 pm

Thanks - in my original post I mention a screen shot which did not attach for some reason. I do already have "Find dialog defaults to word under cursor" checked. Unchecking "Regular Expressions" in the Find dialog did fix my problem but, as I wrote in a previous reply, I'm not sure why since I've had that checked in the past and never saw this problem before.

Thanks for the help!
User avatar
moosemanct
Newbie
 
Posts: 3
Joined: Tue Mar 14, 2006 12:00 am

Re: F3 Search for Highlighted text

Postby Mofi » Wed Mar 15, 2006 9:31 am

The configuration option you are talking about is not Find dialog defaults to word under cursor. You are talking about Find Next/Prev finds selected text (not last searched for text).

If you have checked regular expression, F3 always searches down with this regular expression and not the string currently highlighted. This is unchanged since first version of UltraEdit supporting regular expression search.

Well, if you have started a regular expression search and after first found you do not modify the selection marked by the initial search and continue with F3 the search, you maybe will again find the same word, especially if you have not really entered a regular expression search string.

The regular expression option will not have a search influence if you search for example for "hello". "hello" does not contain a regular expression character. So the searches with option regular expression checked or unchecked return the same find results.

But if regular expression is checked and you select with the mouse an other phrase like "hello moosemanct" and press now F3 (find next), the search down still searches for "hello" because of regular expression is still checked. If regular expression is not checked on initial search for "hello" and you now select "hello moosemanct" and press F3, then "hello moosemanct" is searched in down direction if the configuration option I mentioned at top of this article is set.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4051
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: F3 Search for Highlighted text

Postby moosemanct » Wed Mar 15, 2006 12:27 pm

Yup - I have "Find Next/Prev finds selected text " selected as well. I really must not have had regular expression checked all this time.

Thanks to you all for your help in getting this corrected. Much appreciated!

MooseManCT
Hartford, Connecticut
User avatar
moosemanct
Newbie
 
Posts: 3
Joined: Tue Mar 14, 2006 12:00 am


Return to Find/Replace/Regular Expressions