Page 1 of 1

Quicksearch new tab via scripting behavior

Posted: 29 Oct 2020 10:07
by jupe
I am not sure you would call this a bug, or just expected behavior, but I have found it irritating for a long time, and wanted to see what you think. In my main profile I have this setting disabled:

Configuration | Find and Filter | Find Files & Branch View | Find Files | Show quick search results in current tab

and it suits me fine for day to day use, but sometimes when writing scripts I want to guarantee that results are in a new tab, so normally I would use something like this: tab("new", "<xypath>?/n"); but with the setting above disabled that results in 2 new tabs opening, a clone and the QS results, now you might say, I could just use a new+goto instead, which would work to an extent, but if I run said script in a different XY or a fresh (which has the above setting enabled by default) then I wouldn't have the same guaranteed outcome, now there are various ways to mitigate this behavior, but they all involve multiple lines of scripting, to me when a quicksearch is called for in a new tab explicitly via scripting, then that is what should happen regardless of the above setting, but maybe it is hard in the code to differentiate, so understand if you want to leave it as is.

Re: Quicksearch new tab via scripting behavior

Posted: 29 Oct 2020 16:35
by admin
Tricky. I'm not totally sure if I do the right thing here, but in the next beta when the search is called by a script:

1) The setting of Configuration | Find and Filter | Find Files & Branch View | Find Files | Show quick search results in current tab is ignored and internally treated as being ticked.
2) The setting of Configuration | Find and Filter | Find Files & Branch View | Find Files | Show search results in is ignored and internally treated being "Current tab".

Re: Quicksearch new tab via scripting behavior

Posted: 02 Nov 2020 23:52
by jupe
I have tested quite a bit, and so far everything seems good to me now, hopefully the change doesn't negatively effect anyone else, and has no downsides I haven't encountered, so you don't have to rollback. Thanks.