[solved] search and replace within selection
-
wrote on 22 Oct 2013, 11:24 last edited by
hi there,
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 ?
-
wrote on 22 Oct 2013, 13:38 last edited by
i'm using creator 2.8.1 on windows 7.
-
Strange, I am not experiencing that. Which type of search are you doing ? RegExp ?
-
wrote on 22 Oct 2013, 20:53 last edited by
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 :)
-
wrote on 23 Oct 2013, 22:58 last edited by
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.
-
Right !
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
3/8