Page 1 of 1

VF results not matching QS

Posted: 05 Nov 2022 00:32
by jupe
I am not entirely sure if this sort of slightly complex query is expected to work in GVF/VF/LF, although if using QS it does, maybe VF just has never been capable of this and I have just never tried previously, anyway I have knocked up a repro script to illustrate the issue, which has also exposed a couple other things that I think might need checking into anyway, even if I am just misusing VF first char negation.

Code: Select all

  $path = "<xyscripts>\LF_test";
  $ext  = "txt";
  $filter = "!(two | three) AND !Tags:test AND Ext:$ext";

  focus "P1";
  if (!exists($path)) { while ($i++ < 40) { new("$path\" . gettoken("one two three four five", rand(1, 5), " ", , rand(1, 2)) . ".$ext"); } }
  tab("new", $path);
  tagitems("tags", "test", quicksearch("/l=4 /fn", $path));
  filter $filter;
  focus "P2";
  tab("new", $path);
  #263; // INIT QS, ELSE BELOW QS DOESN'T WORK ON FIRST RUN
  goto quicksearch(":$filter /fn", $path, "|") . "?"; // THIS QS DOESN'T WORK ON FIRST RUN (I THINK BUG)
After running the script you should notice the correct results in the QS pane, but theoretically both panes should match? Initially I thought it may have had something to do with VFAllowMasterInvertOldWay, but I have tried both settings which didn't change the results, so just thought I'd see if you think it should work, but I made this report mainly because of the other issues, such as when I run the above script in fresh, without that second last line of #263 (which I used just to initialize QS) then the last line QS doesn't have a return, but from second run on is ok, this seems like a bug, you can test by just commenting out that line, and running in fresh.

Additionally I noticed that SyncSelect doesn't work (conditionally) when one of the panes is a manually invoked QS (maybe div issue), you can test via GUI after running above script, or text syncselect(, 1, , 2);

Re: VF results not matching QS

Posted: 05 Nov 2022 19:46
by admin
VF does not support parentheses. Rewrite it as !two and !three AND !Tags:test AND Ext:txt to make it work.

Re: VF results not matching QS

Posted: 05 Nov 2022 20:38
by jupe
Yes, thanks I already understood how to modify the pattern to make it work in VF, I was just using it in the example because I was mistakenly under the impression that the parsing logic between QS and VF was sync'd when you added them to the cell context menu, but now I see that VF only supports parentheses in a master invert situation.

The main reason for the post was the other 2 issues which are demo'd when using the repro script.

Re: VF results not matching QS

Posted: 05 Nov 2022 21:07
by admin
Conc. #263; // INIT QS, ELSE BELOW QS DOESN'T WORK ON FIRST RUN:

Yes, confirmed, good bug! :bug: :tup: Took me an hour to get down to the heart of the problem. But I got it and fixed it.

PS: I'll look into SyncSelect tomorrow...

Re: VF results not matching QS

Posted: 06 Nov 2022 06:06
by jupe
oooh I finally found a good bug! :P

Re: VF results not matching QS

Posted: 06 Nov 2022 09:25
by admin
SyncSelect issue fixed.

BTW, mentioning bugs can really help get a point across. These are also good bugs:

Re: VF results not matching QS

Posted: 06 Nov 2022 19:35
by jupe
Confirmed both fixed in v23.70.0208 :cup:

Thanks for your effort fixing the QS issue, it took me a while to understand that one.