Page 1 of 1

Searching for strings like "combo_run(Testing)"

PostPosted: Tue Oct 08, 2019 4:06 am
by pablosscripts
This changed like...12 months ago? It's annoyed me for a while but I've just kind of dealt with it.

I can't search for the string "combo_run(Testing)" anymore. I can only search for "Testing", which is annoying because sometimes I want to locate a very specific use of a combo or function. Is there any way to revert back to the original search behaviour?

Re: Searching for strings like "combo_run(Testing)"

PostPosted: Tue Oct 08, 2019 4:24 am
by Scachi
wasn't it always working like this ? -> https://github.com/J2Kbr/GtunerIV/issues/212
use \ in front of the brackets .. search for "combo_run\(Testing\)" will find your string.

I already opened an issue to have the search working when using selected text and pressing ctrl+f -> https://github.com/J2Kbr/GtunerIV/issues/346

Adding a checkbox to the "Find options" for "[ ] use regexp" or "[ ] regular expression" would be nice for easier search usage and still have the power of using regexp when required.

Re: Searching for strings like "combo_run(Testing)"

PostPosted: Tue Oct 08, 2019 6:18 am
by pablosscripts
Scachi wrote:wasn't it always working like this ? -> https://github.com/J2Kbr/GtunerIV/issues/212


Na that was about decimals.

Scachi wrote:use \ in front of the brackets .. search for "combo_run\(Testing\)" will find your string.


I think this is the point I'm trying to make. I never needed to use forward slashes when Gtuner IV first came out. I'm pretty sure for the first 12-18 months it was never an issue.

Scachi wrote:I already opened an issue to have the search working when using selected text and pressing ctrl+f -> https://github.com/J2Kbr/GtunerIV/issues/346



Thanks for that. So this would allow me to do a search on "key_set(Testing" instead of "key_set\(\Testing"?

Re: Searching for strings like "combo_run(Testing)"

PostPosted: Tue Oct 08, 2019 7:47 am
by Scachi
pablosscripts wrote:
Scachi wrote:wasn't it always working like this ? -> https://github.com/J2Kbr/GtunerIV/issues/212


Na that was about decimals.

Yes.. it was about decimals..but the reason it didn't work was the dot of the decimals. That dot has special meaning in regexp like ( or [ and others that has to be escape with a \ to get it parsed as text. So the reason the decimal isn't working is the same as why the ( isn't working.

pablosscripts wrote:
Scachi wrote:use \ in front of the brackets .. search for "combo_run\(Testing\)" will find your string.

I think this is the point I'm trying to make. I never needed to use forward slashes when Gtuner IV first came out. I'm pretty sure for the first 12-18 months it was never an issue.
I can't remember if I ever searched for something with a ( in it or if I did put the \ in front of it all the time.
As you are sure it did work before you could open a github issue asking for a fix.
J2kbr should be able to tell us if this has changed or not.

pablosscripts wrote:
Scachi wrote:I already opened an issue to have the search working when using selected text and pressing ctrl+f -> https://github.com/J2Kbr/GtunerIV/issues/346

Thanks for that. So this would allow me to do a search on "key_set(Testing" instead of "key_set\(\Testing"?

When you are selecting some text within your file and hit ctrl+f it uses that string to do a search for.
This is not escaped at the moment so when you select something like "myfunc()" it will fail to find a match because of the regexp. My request is to automatically escape the selected text when it gets added into the search box by using ctrl+f.
"myfunc()" will result in "myfunc\(\)" being used in the search and it will be able to find a match without us having to escape the script manually. When you type in "myfunc()" manually into the search box it will still fail to find it.

I'll add a feature request to github to add a regexp checkbox to the search or some other options to disable regexp usage in search. Added: https://github.com/J2Kbr/GtunerIV/issues/348

Re: Searching for strings like "combo_run(Testing)"

PostPosted: Tue Oct 08, 2019 9:24 am
by pablosscripts
Scachi wrote:As you are sure it did work before you could open a github issue asking for a fix.
J2kbr should be able to tell us if this has changed or not.


Yup 100%, if I have 10 references to combo ThisExample, I don't want to have to search for all 10 when I know 9/10 are combo_run(ThisExample) and the issue I need to fix is with combo_restart(ThisExample). I hope that makes sense. I never logged it as I thought it was the way developers liked it, but it's so incredibly annoying that I can't stand it anymore and thought I'd ask around...!