File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -45,20 +45,20 @@ function filterRepoFiles(keys) {
4545 // Remove all tr
4646 $ ( '#repo-find-files-table tbody' ) . empty ( ) ;
4747
48- let hit = false ;
48+ let hit = 0 ;
4949 const treeLink = $ ( '#tree-link' ) . val ( ) ;
5050 for ( let i = 0 ; i < files . length ; i ++ ) {
51- if ( i >= threshold ) break ;
51+ if ( hit >= threshold ) break ;
5252
5353 const keysTrim = keys . trim ( ) ;
5454 const hitIndexes = hitAllKeys ( keysTrim , files [ i ] ) ;
5555 if ( hitIndexes . length > 0 && keysTrim . length === hitIndexes . length ) {
5656 const textWithHl = addHighLightToHit ( files [ i ] , hitIndexes ) ;
5757 generateTrWithHighlight ( treeLink , files [ i ] , textWithHl ) ;
58- hit = true ;
58+ hit ++ ;
5959 }
6060 }
61- if ( hit ) {
61+ if ( hit > 0 ) {
6262 $ ( '#no-hit-prompt' ) . hide ( ) ;
6363 } else {
6464 $ ( '#no-hit-prompt' ) . show ( ) ;
You can’t perform that action at this time.
0 commit comments