@@ -796,9 +796,9 @@ export class TypeOperations {
796796 return null ;
797797 }
798798
799- public static typeWithInterceptors ( prevEditOperationType : EditOperationType , config : CursorConfiguration , model : ITextModel , selections : Selection [ ] , autoClosedCharacters : Range [ ] , ch : string ) : EditOperationResult {
799+ public static typeWithInterceptors ( isDoingComposition : boolean , prevEditOperationType : EditOperationType , config : CursorConfiguration , model : ITextModel , selections : Selection [ ] , autoClosedCharacters : Range [ ] , ch : string ) : EditOperationResult {
800800
801- if ( ch === '\n' ) {
801+ if ( ! isDoingComposition && ch === '\n' ) {
802802 let commands : ICommand [ ] = [ ] ;
803803 for ( let i = 0 , len = selections . length ; i < len ; i ++ ) {
804804 commands [ i ] = TypeOperations . _enter ( config , model , false , selections [ i ] ) ;
@@ -809,7 +809,7 @@ export class TypeOperations {
809809 } ) ;
810810 }
811811
812- if ( this . _isAutoIndentType ( config , model , selections ) ) {
812+ if ( ! isDoingComposition && this . _isAutoIndentType ( config , model , selections ) ) {
813813 let commands : Array < ICommand | null > = [ ] ;
814814 let autoIndentFails = false ;
815815 for ( let i = 0 , len = selections . length ; i < len ; i ++ ) {
@@ -827,13 +827,15 @@ export class TypeOperations {
827827 }
828828 }
829829
830- if ( this . _isAutoClosingOvertype ( config , model , selections , autoClosedCharacters , ch ) ) {
830+ if ( ! isDoingComposition && this . _isAutoClosingOvertype ( config , model , selections , autoClosedCharacters , ch ) ) {
831831 return this . _runAutoClosingOvertype ( prevEditOperationType , config , model , selections , ch ) ;
832832 }
833833
834- const autoClosingPairOpenCharType = this . _isAutoClosingOpenCharType ( config , model , selections , ch , true ) ;
835- if ( autoClosingPairOpenCharType ) {
836- return this . _runAutoClosingOpenCharType ( prevEditOperationType , config , model , selections , ch , true , autoClosingPairOpenCharType ) ;
834+ if ( ! isDoingComposition ) {
835+ const autoClosingPairOpenCharType = this . _isAutoClosingOpenCharType ( config , model , selections , ch , true ) ;
836+ if ( autoClosingPairOpenCharType ) {
837+ return this . _runAutoClosingOpenCharType ( prevEditOperationType , config , model , selections , ch , true , autoClosingPairOpenCharType ) ;
838+ }
837839 }
838840
839841 if ( this . _isSurroundSelectionType ( config , model , selections , ch ) ) {
@@ -842,7 +844,7 @@ export class TypeOperations {
842844
843845 // Electric characters make sense only when dealing with a single cursor,
844846 // as multiple cursors typing brackets for example would interfer with bracket matching
845- if ( this . _isTypeInterceptorElectricChar ( config , model , selections ) ) {
847+ if ( ! isDoingComposition && this . _isTypeInterceptorElectricChar ( config , model , selections ) ) {
846848 const r = this . _typeInterceptorElectricChar ( prevEditOperationType , config , model , selections [ 0 ] , ch ) ;
847849 if ( r ) {
848850 return r ;
0 commit comments