I’ve been seeing things where a search gives what I know are incorrect results, or worse, I’ll go for days thinking I’ve identified all the references to some string in a project then find out I missed a few. I think I’ve somewhat figured out how to reproduce it.
Selecting a folder in the File Browser and hitting ⇧⌘F mostly works as expected, but if the Find dialog is already open, the “In:” field doesn’t update.
If you perform the search anyway, it seems to sometimes search the original location (still displayed) and sometimes search what you had selected in the File Browser, even though that isn’t displayed. I swear it searches the entire project sometimes as well, but I could be wrong about that.
In any case, something isn’t quite right. Thanks.
On 8 Jun 2020, at 16:24, Rob McBroom wrote:
Selecting a folder in the File Browser and hitting ⇧⌘F mostly works as expected, but if the Find dialog is already open, the “In:” field doesn’t update.
This is intended behavior: There was another thread about this, although the opposite issue, that double-clicking a result leads to closing the dialog, and then getting it back again (with ⇧⌘F) loses the search folder (for which ⌘[ / ⌘] was introduced as a way to go back / forward in folder search history).
For the file browser though, clicking the magnifying glass will always update the search folder (regardless of whether dialog is showing or not).
If you perform the search anyway, it seems to sometimes search the original location (still displayed) and sometimes search what you had selected in the File Browser, even though that isn’t displayed. I swear it searches the entire project sometimes as well, but I could be wrong about that.
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.
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.
In any case, something isn’t quite right. Thanks.
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.
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:”.
![](cid:7E93276A-4338-4F74-B4A6-B56AE3E20E4B@skurfer.com "Screen Shot 2020-08-06 at 7.36.26 AM.png")
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.