@@ -101,12 +101,11 @@ var Text = function(parentEl) {
101
101
return true ;
102
102
} ;
103
103
104
- this . highlightIndentGuides = true ;
104
+ this . $ highlightIndentGuides = true ;
105
105
this . setHighlightIndentGuides = function ( highlight ) {
106
- if ( this . displayIndentGuides === false ) return false ;
107
- if ( this . highlightIndentGuides === highlight ) return false ;
106
+ if ( this . $highlightIndentGuides === highlight ) return false ;
108
107
109
- this . highlightIndentGuides = highlight ;
108
+ this . $ highlightIndentGuides = highlight ;
110
109
return highlight ;
111
110
} ;
112
111
@@ -428,7 +427,7 @@ var Text = function(parentEl) {
428
427
} ;
429
428
430
429
this . $highlightIndentGuide = function ( ) {
431
- if ( ! this . highlightIndentGuides ) return ;
430
+ if ( ! this . $ highlightIndentGuides || ! this . displayIndentGuides ) return ;
432
431
433
432
this . $highlightIndentGuideMarker = {
434
433
indentLevel : undefined ,
@@ -486,9 +485,9 @@ var Text = function(parentEl) {
486
485
var childNodes = cell . element . childNodes ;
487
486
if ( childNodes . length > 0 ) {
488
487
for ( var j = 0 ; j < childNodes . length ; j ++ ) {
489
- if ( childNodes [ j ] . className && childNodes [ j ] . className . search ( "ace_indent-guide-active" ) !== - 1 ) {
490
- childNodes [ j ] . className = childNodes [ j ] . className . replace (
491
- "ace_indent-guide-active" , "ace_indent-guide" ) ;
488
+ if ( childNodes [ j ] . classList && childNodes [ j ] . classList . contains ( "ace_indent-guide-active" ) ) {
489
+ childNodes [ j ] . classList . remove ( "ace_indent-guide-active" ) ;
490
+ break ;
492
491
}
493
492
}
494
493
}
@@ -499,9 +498,8 @@ var Text = function(parentEl) {
499
498
var line = this . session . doc . getLine ( cell . row ) ;
500
499
if ( line !== "" ) {
501
500
var childNodes = cell . element . childNodes ;
502
- if ( childNodes && childNodes [ indentLevel - 1 ] && childNodes [ indentLevel - 1 ] . className ) {
503
- childNodes [ indentLevel - 1 ] . className = childNodes [ indentLevel - 1 ] . className . replace (
504
- "ace_indent-guide" , "ace_indent-guide-active" ) ;
501
+ if ( childNodes && childNodes [ indentLevel - 1 ] && childNodes [ indentLevel - 1 ] . classList ) {
502
+ childNodes [ indentLevel - 1 ] . classList . add ( "ace_indent-guide-active" ) ;
505
503
}
506
504
}
507
505
} ;
0 commit comments