Select {file$} runs even if nothing is selected

I use this:

SELECT REGEXP "^{file$|escregexp|noext}\.part\d{1,3}\.rar$"

I use C++ TR1 (ECMAScript) regex style.

However, one thing.. not sure if it was introduced with this version or if the fix revealed another bug:
Short Version:
Using {file$} in a SELECT command doesn't stop that command from running when there isn't a selection present as it does in other commands.
Using SELECT REGEXP "^{file$}ANYNAME.txt" selects everything when nothing is selected (can use any modifier for {file$}). Remove the ^, then it doesn't.

Long Version:

  • Make a button with the code above
  • Click somewhere in the lister where it isn't a file (or run SELECT DESELECT *)
  • Click the button containing the above.
  • Result: Everything is selected (including folders), even though I use {file$}, and the pattern shouldn't match anything.
  • Expected result: Do nothing as no files are selected. And especially don't select any files as none should match.
  • If I had files selected, then it works as expected, i.e selects all parts of the selected .rar files and nothing else.

I tried using dlgstring to see what was wrong using:


That displayed a pattern which shouldn't match anything at all, i.e "^.part\d{1,3}.rar$".
Initially I used {file$} in the dlgstring too, but then the button wouldn't run (which was the expected behaviour of the button above).

A similar thing happens with this:

SELECT "{file$|noext}*.rar"

The command is executed, even though it uses {file$}.
But instead of selecting .rar (as {file$} would should contain nothing) it opens the Select Files dialog with no prefilled pattern (.)

Same with SELECT "{file$}", which should just selects the selected file, if anything is selected (it has no purpose, but as that too runs without a selection, I mentioned it).
Using SELECT REGEXP "^{file$}ANYNAME.txt" selects everything when nothing is selected. Remove the ^, then it doesn't.

Thanks for reporting this. The next version should handle this situation better.