Page 1 of 1

Question on find commands

Posted: Thu Jul 29, 2010 4:13 pm
by fnar
Codelite version: 2.6.0.4189
Operating system: Ubuntu 10.04

Hi it's me again.
Just a quick question regarding searching in CodeLite.

In the search menu there are entries for Find Next/Previous and also for Find Word At Carret/Backward.

With Find Next/Previous the last search entry will be searched for.
With Find Word At Carret/Backward the word where the cursor is will be searched.

However, if i mark a word in the code and use Find Next/Previous it will not search for the last search entry but for the marked word, which is what Find Word At Carret/Backward is for.

Is this intentional?

Re: Question on find commands

Posted: Thu Jul 29, 2010 5:51 pm
by eranif
fnar wrote:However, if i mark a word in the code and use Find Next/Previous it will not search for the last search entry but for the marked word, which is what Find Word At Caret/Backward is for.
The different between the two is when there is no selection. 'Find Word at Caret' will search the *next* string that is under caret (i.e. the current word will not be selected, but rather the next match)

however, if the word is already selected, the functionality is pretty much similar.

Eran

Re: Question on find commands

Posted: Tue Aug 03, 2010 11:09 am
by fnar
I don't know if i am the only one finding this method a little tricky to work with.

Example:
I have a header file with a class in it, i check up on a member variable in the header and mark it for search. Find Word At Caret puts it into the search field.
Now i switch to the source file and press Find Next. If i had some word marked from working in this file before i will not get the search result i wanted (the member var from the header) but the word that was marked.

So i always have to make sure to not have something selected when using Find Next.
On the other hand i do have Find Word At Caret wich will do exactly that, find the next instance of the selection.
If Find Next would only search for the last search entry and ignore currently selected text i would have 2 commands for 2 different tasks without them interfering with each other.