File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,7 @@ export class Input {
9090 intoQuickNav ( ) {
9191 this . enterNav ( ) ;
9292 if ( ! this . searcher ) return ;
93+ if ( ! this . searcher . foundAny ) return ;
9394 this . quickNavs = this . searcher . setQuickNavKey ( ) ;
9495 }
9596
@@ -392,6 +393,8 @@ class Searcher {
392393 private tree : TreeNode ;
393394 private searchReg : RegExp | string | null = null ;
394395
396+ foundAny = false ;
397+
395398 constructor ( root : HTMLDivElement , init : SearchConfig ) {
396399 this . tree = new TreeNode ( root ) ;
397400 this . search ( init ) ;
@@ -418,7 +421,7 @@ class Searcher {
418421 break ;
419422 }
420423 if ( this . searchReg ) {
421- this . searchTree ( this . tree , this . searchReg , config . filter ) ;
424+ this . foundAny = this . searchTree ( this . tree , this . searchReg , config . filter ) ;
422425 }
423426 }
424427
You can’t perform that action at this time.
0 commit comments