@@ -222,7 +222,7 @@ CodeMirror.defineMode("clike", function(config, parserConfig) {
222
222
while ( ctx . type == "statement" && parserConfig . dontIndentStatements . test ( ctx . info ) )
223
223
ctx = ctx . prev
224
224
if ( hooks . indent ) {
225
- var hook = hooks . indent ( state , ctx , textAfter , indentUnit , closing ) ;
225
+ var hook = hooks . indent ( state , ctx , textAfter , indentUnit ) ;
226
226
if ( typeof hook == "number" ) return hook
227
227
}
228
228
var switchBlock = ctx . prev && ctx . prev . info == "switch" ;
@@ -632,7 +632,7 @@ CodeMirror.defineMode("clike", function(config, parserConfig) {
632
632
state . tokenize = tokenKotlinString ( stream . match ( '""' ) ) ;
633
633
return state . tokenize ( stream , state ) ;
634
634
} ,
635
- indent : function ( state , ctx , textAfter , indentUnit , closing ) {
635
+ indent : function ( state , ctx , textAfter , indentUnit ) {
636
636
var firstChar = textAfter && textAfter . charAt ( 0 ) ;
637
637
if ( ( state . prevToken == "}" || state . prevToken == ")" ) && textAfter == "" )
638
638
return state . indented ;
@@ -641,7 +641,7 @@ CodeMirror.defineMode("clike", function(config, parserConfig) {
641
641
( state . prevToken == "}" || state . prevToken == ")" ) && firstChar == "." )
642
642
return indentUnit * 2 + ctx . indented ;
643
643
if ( ctx . align && ctx . type == "}" )
644
- return ctx . indented + ( closing ? 0 : indentUnit ) ;
644
+ return ctx . indented + ( state . context . type == ( textAfter || "" ) . charAt ( 0 ) ? 0 : indentUnit ) ;
645
645
}
646
646
} ,
647
647
modeProps : { closeBrackets : { triples : '"' } }
0 commit comments