On 6 Aug 2020, at 7:05, Allan Odgaard via TextMate wrote:

For the file browser though, clicking the magnifying glass will always update the search folder (regardless of whether dialog is showing or not).

I had never even noticed that magnifying glass, but it does work as described/expected. Is there a keyboard shortcut that does what clicking the magnifying glass does?

I have not seen inconsistencies myself, in what is being searched and what is shown, and it is not obvious to me how the code could have such bug.

I’m using 2.0.15…

  1. Select a file and hit ⇧⌘F.
  2. Perform the search. Don’t close the Find window.
  3. Back in the File Browser, select something else, like the previous file’s parent folder.
  4. Hit ⇧⌘F. The Find window gains focus, but the previous value for “In:” is still shown.
  5. Perform the search.

You’ll see results based on what you selected in the File Browser instead of what “In:” shows. In this screenshot, you can see that the file referred to in the results is not the file being searched according to “In:”.

But I do acknowledge that sometimes changing the search folder (when pressing ⇧⌘F) and other times not, even though the rule should be simple (change only when dialog is not already visible), is not ideal, but I am not sure what the ideal behavior would be.

The way I thought it worked seems simple enough: If the File Browser has focus when hitting ⇧⌘F, change “In:” to the selection. If the editor has focus, set “In:” to the Project Folder. To put it another way, always do the same thing whether the Find dialog is open or not. But I don’t think I understand all the use cases and workflows you’re trying to address.

Do you search single folders or multiple folders? I could see greater chance of confusion for the latter, as here, the search dialog simply says “File browser items” instead of the actual folder, so perhaps improvements there could help.

Single folders. Thanks.

--
Rob McBroom