@@ -212,7 +212,7 @@ define(function (require, exports, module) {
212212 if ( searchItem . collapsed !== collapsed ) {
213213 searchItem . collapsed = collapsed ;
214214 $ ( this ) . nextUntil ( ".file-section" ) . toggle ( ) ;
215- $ ( this ) . find ( ".disclosure-triangle" ) . toggleClass ( "expanded" ) . toggleClass ( "collapsed" ) ;
215+ $ ( this ) . find ( ".disclosure-triangle" ) . toggleClass ( "expanded" ) ;
216216 }
217217 } ) ;
218218
@@ -385,7 +385,7 @@ define(function (require, exports, module) {
385385 self = this ;
386386
387387 this . _showSummary ( ) ;
388- this . _searchList = [ ] ;
388+ this . _searchList = [ ] ;
389389
390390 // Iterates throuh the files to display the results sorted by filenamess. The loop ends as soon as
391391 // we filled the results for one page
@@ -427,16 +427,17 @@ define(function (require, exports, module) {
427427 multiLine = match . start . line !== match . end . line ;
428428
429429 searchItems . push ( {
430- fileIndex : self . _searchList . length ,
431- itemIndex : searchItems . length ,
432- matchIndex : i ,
433- line : match . start . line + 1 ,
434- pre : match . line . substr ( 0 , match . start . ch ) ,
435- highlight : match . line . substring ( match . start . ch , multiLine ? undefined : match . end . ch ) ,
436- post : multiLine ? "\u2026" : match . line . substr ( match . end . ch ) ,
437- start : match . start ,
438- end : match . end ,
439- isChecked : match . isChecked
430+ fileIndex : self . _searchList . length ,
431+ itemIndex : searchItems . length ,
432+ matchIndex : i ,
433+ line : match . start . line + 1 ,
434+ pre : match . line . substr ( 0 , match . start . ch ) ,
435+ highlight : match . line . substring ( match . start . ch , multiLine ? undefined : match . end . ch ) ,
436+ post : multiLine ? "\u2026" : match . line . substr ( match . end . ch ) ,
437+ start : match . start ,
438+ end : match . end ,
439+ isChecked : match . isChecked ,
440+ isCollapsed : item . collapsed
440441 } ) ;
441442 if ( ! match . isChecked ) {
442443 allInFileChecked = false ;
@@ -456,11 +457,12 @@ define(function (require, exports, module) {
456457 ) ;
457458
458459 self . _searchList . push ( {
459- fileIndex : self . _searchList . length ,
460- filename : displayFileName ,
461- fullPath : fullPath ,
462- isChecked : allInFileChecked ,
463- items : searchItems
460+ fileIndex : self . _searchList . length ,
461+ filename : displayFileName ,
462+ fullPath : fullPath ,
463+ isChecked : allInFileChecked ,
464+ items : searchItems ,
465+ isCollapsed : item . collapsed
464466 } ) ;
465467 }
466468 } ) ;
@@ -473,16 +475,7 @@ define(function (require, exports, module) {
473475 replace : this . _model . isReplace ,
474476 searchList : this . _searchList ,
475477 Strings : Strings
476- } ) )
477- // Restore the collapsed files
478- . find ( ".file-section" ) . each ( function ( ) {
479- var fullPath = self . _searchList [ $ ( this ) . data ( "file-index" ) ] . fullPath ;
480-
481- if ( self . _model . results [ fullPath ] . collapsed ) {
482- self . _model . results [ fullPath ] . collapsed = false ;
483- $ ( this ) . trigger ( "click" ) ;
484- }
485- } ) ;
478+ } ) ) ;
486479
487480 if ( this . _$selectedRow ) {
488481 this . _$selectedRow . removeClass ( "selected" ) ;
0 commit comments