diff --git a/Browser.py b/Browser.py index 8ce2db8..26867c4 100644 --- a/Browser.py +++ b/Browser.py @@ -1302,12 +1302,14 @@ class Browser(ft.Row): if self.EntryFilter: Entries = [Entry for Entry in Entries if self.EntryFilter(Entry)] if self.Config.ShowSearch and self.SearchText: - # Directories never get filtered out, even if their name doesn't - # match — otherwise typing a search hides the very folders you'd - # need to navigate into to find more, making it impossible to go - # anywhere else while a filter is active (the actual bug report: - # "cannot go into directories if there is a search bar"). - Entries = [Entry for Entry in Entries if Entry.is_dir() or self._MatchesSearch(Entry.name)] + # Directories filter by name same as files (feedback: "Search + # doesn't affect directories"). They used to be exempted here as + # a (wrong) fix for "cannot go into directories if there is a + # search bar" — that bug's real cause was Ctrl+F leaving CtrlHeld + # stuck (see _SetShortcutsPaused/_ToggleSearchBar), not this + # filter; with that fixed at the root, there's no reason left to + # keep directories unfilterable. + Entries = [Entry for Entry in Entries if self._MatchesSearch(Entry.name)] Entries = self._SortEntries(Entries) self.CurrentEntries = Entries # A refresh (new/renamed/deleted files) can leave stale paths in the