1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-01-26 17:06:51 +00:00

Make sidebarsegments/search-results-count work with all search tabs (#5062)

This commit is contained in:
Simon Huber 2020-11-17 20:05:32 +01:00 committed by GitHub
parent 684f13fbcb
commit eae3da0e9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,11 +8,13 @@ tags: $:/tags/SideBarSegment
<$button popup=<<qualify "$:/state/popup/search-dropdown">> class="tc-btn-invisible"> <$button popup=<<qualify "$:/state/popup/search-dropdown">> class="tc-btn-invisible">
{{$:/core/images/down-arrow}} {{$:/core/images/down-arrow}}
<$list filter="[{$(searchTiddler)$}minlength{$:/config/Search/MinLength}limit[1]]" variable="listItem"> <$list filter="[{$(searchTiddler)$}minlength{$:/config/Search/MinLength}limit[1]]" variable="listItem">
<$set name="searchTerm" value={{{ [<searchTiddler>get[text]] }}}> <$vars userInput={{{ [<searchTiddler>get[text]] }}} configTiddler={{{ [[$:/state/search/currentTab]!is[missing]get[text]] ~[{$:/config/SearchResults/Default}] }}}>
<$set name="resultCount" value="""<$count filter="[!is[system]search<searchTerm>]"/>"""> <$vars primaryListFilter={{{ [<configTiddler>get[first-search-filter]] }}} secondaryListFilter={{{ [<configTiddler>get[second-search-filter]] }}}>
<$set name="resultCount" value="""<$count filter="[subfilter<primaryListFilter>] =[subfilter<secondaryListFilter>]"/>""">
{{$:/language/Search/Matches}} {{$:/language/Search/Matches}}
</$set> </$set>
</$set> </$vars>
</$vars>
</$list> </$list>
</$button> </$button>
\end \end