Author Topic: erroneous behavior of the search function  (Read 4748 times)

Offline frithjofh

  • Regular
  • ***
  • Posts: 376
erroneous behavior of the search function
« on: May 09, 2011, 05:47:33 pm »
Hello everybody,

I just realized, that the normal search function (strg+F) does not work correctly when invoked by the context menu when the item to be searched for is in a commentary. It just does nothing. Searching the item with ctrl+F does work as expected.

OS SuSE Linux 11.3 x86_64
version C::B: svn 7141 self compiled

Best regards

frithjofh
« Last Edit: May 09, 2011, 07:00:42 pm by nausea »
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: erroneous behavior of the search function
« Reply #1 on: May 09, 2011, 08:56:35 pm »
Which context menu do you use to invoke the search ?

Offline frithjofh

  • Regular
  • ***
  • Posts: 376
Re: erroneous behavior of the search function
« Reply #2 on: May 09, 2011, 10:29:34 pm »
the right mouse button context menu. there the third command from above: "find references of:"
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: erroneous behavior of the search function
« Reply #3 on: May 09, 2011, 11:07:12 pm »
This is a totally different search command, than Strg+F.
It searches for references of the symbol under the caret (e.g. a vraiable) in the sources, it's not a literal search.

Offline frithjofh

  • Regular
  • ***
  • Posts: 376
Re: erroneous behavior of the search function
« Reply #4 on: May 09, 2011, 11:13:24 pm »
That may be so, but it does not change the fact about the misbehaving: invoking the search by right-click on a term in a comment does nothing whereas doing the same on a non comment term does a search as expected ...
That a term inside a comment falls out of the category of source symbol does not seem quite right. Many times one just comments-out a piece of code to test an alternative, the commented line still "stays" code in that sense ...

Well, just my opinion, and I'm definitively not a pro ...

Maybe the difference between code searching and literal searching just does not come out clearly enough through the names of the commands or its locations ...

Regards
« Last Edit: May 09, 2011, 11:21:16 pm by nausea »
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: erroneous behavior of the search function
« Reply #5 on: May 09, 2011, 11:21:24 pm »
Confirmed.
I think some of the find ... of in the context-menu should be disabled in comments (reference, declaration, implementation, find functions ...), because the do not really make sense.

Offline frithjofh

  • Regular
  • ***
  • Posts: 376
Re: erroneous behavior of the search function
« Reply #6 on: May 09, 2011, 11:28:09 pm »
Maybe its just the ordering in the popup menu. "Find occurrence" is way down with two commands referring to the calling of functions. The whole menu is getting quite long by now and maybe there is a way of changing the order or grouping of commands. Perhaps the whole menu should not even display commands that make no sense in the context of invocation ... a real "context" menu. But I imagine that there are more pressing things on the work list than that.

Regards and greetings from Asturias to Jens the night-shifter
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100