Starting point for Find Next

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Blue
Addict
Addict
Posts: 886
Joined: Fri Oct 06, 2006 4:41 am
Location: Canada

Starting point for Find Next

Post by Blue »

wish : have the search process start AFTER the highlighted expression.

The Find/Replace function in the IDE is not very sophisticated.
But it does the basic job.

However, it could easily and quickly be improved with the correction of its most annoying behaviour :
when the user clicks on the [Find Next] button, the search function instantaneously finds the highlighted expression that caused the Find/Replace dialog box to open ! :shock: Seriously useless behaviour.

PLEASE make the search process start AFTER the highlighted expression.
That would be a great improvement already.
"That's not a bug..." said the programmer. "it's a feature! "
"Oh! I see..." replied the blind man.
User avatar
Michael Vogel
Addict
Addict
Posts: 2677
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

Re: Starting point for Find Next

Post by Michael Vogel »

It's not perfect, you're right. This behaviour guarantees to find also a changed searching text (select 'abc' in the IDE, then press the keys Ctrl+F, 'b', Enter).

For your case, you need to press also the key F3 to jump to the 'first' occurence.

Maybe the find/replace will get some enhancements, like regular expressions which would help finding coded variants like HideWindow(#Win,0) / HideWindow(#Win,#False) / HideWindow(#Win,#Null)... but there's already a long list of feature requests somewhere in the forum.
User avatar
Blue
Addict
Addict
Posts: 886
Joined: Fri Oct 06, 2006 4:41 am
Location: Canada

Re: Starting point for Find Next

Post by Blue »

So what’s your point ?
If the search starts after the selected expression, the function will either find its next occurrence, or it won’t find any. Which is what one expects from a “normal” search function. If the user modifies the selected item, maybe nothing won’t be found. Again, no big surprise; that’s the expected outcome.

No matter how you look at it, starting the search at the end of the selected item will be an improvement. I just don’t know of any text editor that starts a search with the very item that launched the search in the first place ! Even Windows’s venerable and very limited Notepad doesn’t do that.

Yes, there’s a long list of suggestions for improving the Find/Replace function in the IDE. Most involve a major rework of the function. This one here involves a very minor adjustment, and in my view, yields a major improvement. So, why not start with this baby step ? If the developers have the patience and time and energy, they’re certainly able to decide by themselves if they wish to tackle some of the other big suggested changes.

Meanwhile, we’ll all be happy with a more sensical initial behaviour of the function.
"That's not a bug..." said the programmer. "it's a feature! "
"Oh! I see..." replied the blind man.
User avatar
Michael Vogel
Addict
Addict
Posts: 2677
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

Re: Starting point for Find Next

Post by Michael Vogel »

The find routine ignores the selection and just starts from the actual cursor position.

So all you have to do is selecting the text 'abc' starting from the rightmost character (works also with a double click) :wink:
Dude
Addict
Addict
Posts: 1907
Joined: Mon Feb 16, 2015 2:49 pm

Re: Starting point for Find Next

Post by Dude »

I don't understand this request. Both PureBasic and Notepad do searches the same way. That is, I type the search criteria, hit Enter to start searching, then hit F3 to find each next occurrence. Is there something I'm misunderstanding? :?:
User avatar
Michael Vogel
Addict
Addict
Posts: 2677
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

Re: Starting point for Find Next

Post by Michael Vogel »

Some may want to jump to the next (!) occurence automatically when starting the find with a selected text, this means you need to press F3 less often. A lot of programs do different things here (Winword for instance skips the first character of a selection to avoid Blue's problem)...
...I wouldn't say it's that critical to do another F3 from time to time (more hurting are the replace bug and the missing of shortcuts in the find dialog), but this can be seen differently.
Dude
Addict
Addict
Posts: 1907
Joined: Mon Feb 16, 2015 2:49 pm

Re: Starting point for Find Next

Post by Dude »

Michael Vogel wrote:you need to press F3 less often
Hang on... do you mean literally one single F3 keypress less, is the request? :shock:
Post Reply