[solved] search and replace within selection
i try to do a search and replace on a selection of code. in the documentation it says:
"Note: If you have selected text before selecting Find/Replace, the search is conducted within the selection."
this is what i do. i select text, press ctrl+f, and then it searches the entire file for the highlighted code by default. changing what i'm searching for also lets creator search within the whole file. what am i doing wrong/missing here?
thank you for your help!
Hi and welcome to devnet,
Which version of Qt Creator are you using on which OS ?
i'm using creator 2.8.1 on windows 7.
Strange, I am not experiencing that. Which type of search are you doing ? RegExp ?
No, a normal search via ctrl + f. but now its working for me, too. very strange. sorry to have wasted your time here, i honestly don't know what happened.
thanks for the effort!
You're welcome !
Since it's working now, please update the thread title prepending [solved] so other forum users may know a solution has been found :)
for anyone after me asking what caused this: i think it's happening when you only select one line and then search and replace. selecting more than one line causes the desired behavior.
I forgot about this little detail, a single line selection works the same as a single word selection. You'll need to have at least a "new line" char to activate the "inside this line" search