@@ -222,7 +222,7 @@ CodeMirror.defineMode("clike", function(config, parserConfig) {
222222 while ( ctx . type == "statement" && parserConfig . dontIndentStatements . test ( ctx . info ) )
223223 ctx = ctx . prev
224224 if ( hooks . indent ) {
225- var hook = hooks . indent ( state , ctx , textAfter , indentUnit , closing ) ;
225+ var hook = hooks . indent ( state , ctx , textAfter , indentUnit ) ;
226226 if ( typeof hook == "number" ) return hook
227227 }
228228 var switchBlock = ctx . prev && ctx . prev . info == "switch" ;
@@ -632,7 +632,7 @@ CodeMirror.defineMode("clike", function(config, parserConfig) {
632632 state . tokenize = tokenKotlinString ( stream . match ( '""' ) ) ;
633633 return state . tokenize ( stream , state ) ;
634634 } ,
635- indent : function ( state , ctx , textAfter , indentUnit , closing ) {
635+ indent : function ( state , ctx , textAfter , indentUnit ) {
636636 var firstChar = textAfter && textAfter . charAt ( 0 ) ;
637637 if ( ( state . prevToken == "}" || state . prevToken == ")" ) && textAfter == "" )
638638 return state . indented ;
@@ -641,7 +641,7 @@ CodeMirror.defineMode("clike", function(config, parserConfig) {
641641 ( state . prevToken == "}" || state . prevToken == ")" ) && firstChar == "." )
642642 return indentUnit * 2 + ctx . indented ;
643643 if ( ctx . align && ctx . type == "}" )
644- return ctx . indented + ( closing ? 0 : indentUnit ) ;
644+ return ctx . indented + ( state . context . type == ( textAfter || "" ) . charAt ( 0 ) ? 0 : indentUnit ) ;
645645 }
646646 } ,
647647 modeProps : { closeBrackets : { triples : '"' } }
0 commit comments