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:
|
if self.EntryFilter:
|
||||||
Entries = [Entry for Entry in Entries if self.EntryFilter(Entry)]
|
Entries = [Entry for Entry in Entries if self.EntryFilter(Entry)]
|
||||||
if self.Config.ShowSearch and self.SearchText:
|
if self.Config.ShowSearch and self.SearchText:
|
||||||
# Directories never get filtered out, even if their name doesn't
|
# Directories filter by name same as files (feedback: "Search
|
||||||
# match — otherwise typing a search hides the very folders you'd
|
# doesn't affect directories"). They used to be exempted here as
|
||||||
# need to navigate into to find more, making it impossible to go
|
# a (wrong) fix for "cannot go into directories if there is a
|
||||||
# anywhere else while a filter is active (the actual bug report:
|
# search bar" — that bug's real cause was Ctrl+F leaving CtrlHeld
|
||||||
# "cannot go into directories if there is a search bar").
|
# stuck (see _SetShortcutsPaused/_ToggleSearchBar), not this
|
||||||
Entries = [Entry for Entry in Entries if Entry.is_dir() or self._MatchesSearch(Entry.name)]
|
# 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)
|
Entries = self._SortEntries(Entries)
|
||||||
self.CurrentEntries = Entries
|
self.CurrentEntries = Entries
|
||||||
# A refresh (new/renamed/deleted files) can leave stale paths in the
|
# A refresh (new/renamed/deleted files) can leave stale paths in the
|
||||||
|
|||||||
Reference in new issue
Block a user