Question on find commands

General questions regarding the usage of CodeLite
fnar
CodeLite Enthusiast
Posts: 17
Joined: Fri Jun 18, 2010 1:52 pm
Genuine User: Yes
IDE Question: C++
Contact:

Question on find commands

Post 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?
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Question on find commands

Post 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
Make sure you have read the HOW TO POST thread
fnar
CodeLite Enthusiast
Posts: 17
Joined: Fri Jun 18, 2010 1:52 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Question on find commands

Post 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.
Post Reply