title: $:/core/ui/SideBarSegments/search tags: $:/tags/SideBarSegment \whitespace trim \define count-popup-button() \whitespace trim <$button popup=<> class="tc-btn-invisible"> {{$:/core/images/down-arrow}} <$list filter="[{$(searchTiddler)$}minlength{$:/config/Search/MinLength}limit[1]]" variable="listItem"> <$vars userInput={{{ [get[text]] }}} configTiddler={{{ [[$:/state/search/currentTab]!is[missing]get[text]] ~[{$:/config/SearchResults/Default}] }}} replaceRegexp="limit\[\d+\]"> <$vars primaryListFilter={{{ [get[first-search-filter]search-replace:g:regexp,[]] }}} secondaryListFilter={{{ [get[second-search-filter]search-replace:g:regexp,[]] }}}> <$set name="resultCount" value="""<$count filter="[subfilter] [subfilter]"/>"""> {{$:/language/Search/Matches}} \end \define search-results-list() \whitespace trim <$vars userInput={{$(searchTiddler)$}} configTiddler={{{ [[$:/state/search/currentTab]!is[missing]get[text]] ~[{$:/config/SearchResults/Default}] }}}> <$list filter="[minlength{$:/config/Search/MinLength}limit[1]]" emptyMessage="""
{{$:/language/Search/Search/TooShort}}
""" variable="listItem"> <$tiddler tiddler=<>> {{$:/core/ui/SearchResults}} \end \define cancel-search-actions() <$list filter="[get[text]!match{$:/temp/search}]" emptyMessage="""<$action-deletetiddler $filter="[[$:/temp/search]] [] []"/>"""><$action-setfield $tiddler="$:/temp/search" text={{{ [get[text]] }}}/><$action-setfield $tiddler="$:/temp/search/refresh" text="yes"/> \define input-accept-actions() <$list filter="[{$:/config/Search/NavigateOnEnter/enable}match[yes]]" emptyMessage="""<$list filter="[<__tiddler__>get[text]!is[missing]] ~[<__tiddler__>get[text]is[shadow]]"><$action-navigate $to={{{ [<__tiddler__>get[text]] }}}/>"""><$action-navigate $to={{{ [<__tiddler__>get[text]] }}}/> \define input-accept-variant-actions() <$list filter="[{$:/config/Search/NavigateOnEnter/enable}match[yes]]" emptyMessage="""<$list filter="[<__tiddler__>get[text]!is[missing]] ~[<__tiddler__>get[text]is[shadow]]"><$list filter="[<__tiddler__>get[text]minlength[1]]"><$action-sendmessage $message="tm-edit-tiddler" $param={{{ [<__tiddler__>get[text]] }}}/>"""><$list filter="[<__tiddler__>get[text]minlength[1]]"><$action-sendmessage $message="tm-edit-tiddler" $param={{{ [<__tiddler__>get[text]] }}}/> \define set-next-input-tab(beforeafter:"after") <$macrocall $name="change-input-tab" stateTitle="$:/state/tab/search-results/sidebar" tag="$:/tags/SearchResults" beforeafter="$beforeafter$" defaultState={{$:/config/SearchResults/Default}} actions="""<$action-setfield $tiddler="$:/state/search/currentTab" text=<>/>"""/> \define advanced-search-actions() <$action-setfield $tiddler="$:/temp/advancedsearch" text={{$:/temp/search/input}}/><$action-setfield $tiddler="$:/temp/advancedsearch/input" text={{$:/temp/search/input}}/><><$action-navigate $to="$:/AdvancedSearch"/><$action-setfield $tiddler="$:/temp/advancedsearch/refresh" text="yes"/><$action-sendmessage $message="tm-focus-selector" $param="""[data-tiddler-title="$:/AdvancedSearch"] .tc-search input""" preventScroll="true"/><$action-deletetiddler $filter="$:/temp/search $:/temp/search/input $:/temp/search/refresh []"/>