Author Topic: find & selected text  (Read 16607 times)

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
find & selected text
« on: May 09, 2006, 02:21:19 pm »
Quote from: from svn log rev 2435
* FindNext/FindPrevious would wrongly reset the search text if there was selected text in the editor.
seriously, this was a feature and not a bug :)

i added this long ago in order to find selected text and press F3 to search for it, i find it very convenient ..

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: find & selected text
« Reply #1 on: May 09, 2006, 02:42:26 pm »
Sorry to say this, but this was a pretty annoying "feature".
If I want to change the search text, I press Ctrl+F not F3 ;)
C::B changing it behind the scenes, without me asking for it, has frustrated me one too many times. And I 'm not the only one...
Be patient!
This bug will be fixed soon...

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5529
Re: find & selected text
« Reply #2 on: May 09, 2006, 02:44:45 pm »
I also am guilty : I also looked at it as not such a nice feature.
It is rather surprising that during your search, just by having something selected, your search suddenly changes. If you want to search on something "new", it is a .... "new search" ;-) -> ctrl+f

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: find & selected text
« Reply #3 on: May 09, 2006, 03:16:30 pm »
well i didnt want to annoy someone,
i'm using TextPad Editor since approx. 10 years and i copied the behaviour like Textpad does and found it pretty convenient.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5529
Re: find & selected text
« Reply #4 on: May 09, 2006, 03:33:19 pm »
LOL, TextPad.
I have a colleague at work who also uses TextPad, and each time I need to do something at his desk, I am swearing about the fact TextPad does not follow the normal (or semi-standard) way of searching.  :D

DJMaze

  • Guest
Re: find & selected text
« Reply #5 on: May 12, 2006, 05:42:04 pm »
It is very annoying as two other issues as well.

When you scroll down and click somewhere and then hit F3 the search starts at the beginning of the page again and NOT where the caret is.
The other is when you open another window and hover mouse over codeblocks, then codeblocks is moved to the front and my just opened window is defocused.

These bugs makes it realy useless.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: find & selected text
« Reply #6 on: May 12, 2006, 05:53:10 pm »
Time to defend Tiwag here, for once.

The original "bug" was something that I perceived as a very useful feature. Although one could object it should be an option because some people may not like it. Personally, I found it very useful, but I am fine with pressing Ctrl-F again, too.

When you scroll down and click somewhere and then hit F3 the search starts at the beginning of the page again and NOT where the caret is.
Not true. If set the caret further down in the document, it certainly starts at that position.

The other is when you open another window and hover mouse over codeblocks, then codeblocks is moved to the front and my just opened window is defocused.
Not true, either. This is a X feature  / optional Windows setting. It has nothing to do with Code::Blocks.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: find & selected text
« Reply #7 on: May 12, 2006, 05:57:28 pm »
Not true, either. This is a X feature  / optional Windows setting. It has nothing to do with Code::Blocks.
Wait a second, that is only 99% correct. The drag scroll plugin has a function like that too.
But again, you have to enable it... Code::Blocks doesn't do that on its own behalf.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

DJMaze

  • Guest
Re: find & selected text
« Reply #8 on: May 13, 2006, 04:25:42 am »
When you scroll down and click somewhere and then hit F3 the search starts at the beginning of the page again and NOT where the caret is.
Not true. If set the caret further down in the document, it certainly starts at that position.
It did on mine but somehow with latest compile it doesn't, odd

The other is when you open another window and hover mouse over codeblocks, then codeblocks is moved to the front and my just opened window is defocused.
Not true, either. This is a X feature  / optional Windows setting. It has nothing to do with Code::Blocks.
Wait a second, that is only 99% correct. The drag scroll plugin has a function like that too.
But again, you have to enable it... Code::Blocks doesn't do that on its own behalf.
Strange since i don't use the plugin nor didn't i enable it in Windows 2000, yet it does "BringToFront" Code::Blocks.
But this is offtopic and should have its own topic

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2876
Re: find & selected text
« Reply #9 on: September 28, 2006, 08:56:32 pm »
Sorry to say this, but this was a pretty annoying "feature".
If I want to change the search text, I press Ctrl+F not F3 ;)
C::B changing it behind the scenes, without me asking for it, has frustrated me one too many times. And I 'm not the only one...

I really enjoy this feature/bug.

I'd like to work up a patch for this feature/bug that can be turned on/off. Off by default.

Where should the toggle option be placed. Editor config? Find dialog?

What could I name it? Tiwag feature/Mandrav Bug? Find by Marked? Find Marked?  Find Selected? Any suggestions?

Would the patch even be considered? I'd rather work on something else if it'd be a futile effort.

thanks
pecan

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: find & selected text
« Reply #10 on: October 17, 2006, 07:57:16 pm »
Sorry to say this, but this was a pretty annoying "feature".
If I want to change the search text, I press Ctrl+F not F3 ;)
C::B changing it behind the scenes, without me asking for it, has frustrated me one too many times. And I 'm not the only one...

I really enjoy this feature/bug.

I'd like to work up a patch for this feature/bug that can be turned on/off. Off by default.

Where should the toggle option be placed. Editor config? Find dialog?

What could I name it? Tiwag feature/Mandrav Bug? Find by Marked? Find Marked?  Find Selected? Any suggestions?

Would the patch even be considered? I'd rather work on something else if it'd be a futile effort.

thanks
pecan

@Yiannis - is it ok to add this option to svn ?
but i propose to place the checkbox in the Find-Dialog (Ctrl-F)

also i propose to change the checkbox for Auto-wrap-search from
Settings->Editor Dialog to the Find-Dialog Options.

brgs, tiwag

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5529
Re: find & selected text
« Reply #11 on: October 17, 2006, 08:04:59 pm »
the first one, hmmm ;-)
the second one : good idea, then all search setting are in the same spot

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: find & selected text
« Reply #12 on: October 17, 2006, 08:41:19 pm »
Yes, put everything into the Find dialog :).
Be patient!
This bug will be fixed soon...

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2876
Re: find & selected text
« Reply #13 on: October 17, 2006, 10:23:48 pm »
Yes, put everything into the Find dialog :).

So happy, I can hardly contain myself !!!

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2876
Re: find & selected text
« Reply #14 on: October 19, 2006, 12:54:23 am »
Yes, put everything into the Find dialog :).

Patch is #1571
Find dlg wrap and Find uses selected text.
It Moves Find wrap checkbox to Find dlg and implements tiwags "Find uses Selected Text" as an option in Find dlg