mirror of
https://git.srhtnin.garden/sarah/SaraFem.git
synced 2026-10-13 18:18:11 +02:00
Revert directory search exemption now that the real navigation bug is fixed - search filters directories again
This commit is contained in:
1 parent
a00047e3b9
commit
6b2b35f5da
1 file changed
+8
-6
+8
-6
@@ -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
|
||||
|
||||
Reference in new issue
Block a user