File tree Expand file tree Collapse file tree 1 file changed +12
-13
lines changed
Expand file tree Collapse file tree 1 file changed +12
-13
lines changed Original file line number Diff line number Diff line change 9696 registerEventHandlers ( this ) ;
9797 ensureGlobalHandlers ( ) ;
9898
99- var cm = this ;
100- runInOp ( this , function ( ) {
101- cm . curOp . forceUpdate = true ;
102- attachDoc ( cm , doc ) ;
99+ startOperation ( this ) ;
100+ this . curOp . forceUpdate = true ;
101+ attachDoc ( this , doc ) ;
103102
104- if ( ( options . autofocus && ! mobile ) || activeElt ( ) == display . input )
105- setTimeout ( bind ( onFocus , cm ) , 20 ) ;
106- else
107- onBlur ( cm ) ;
103+ if ( ( options . autofocus && ! mobile ) || activeElt ( ) == display . input )
104+ setTimeout ( bind ( onFocus , this ) , 20 ) ;
105+ else
106+ onBlur ( this ) ;
108107
109- for ( var opt in optionHandlers ) if ( optionHandlers . hasOwnProperty ( opt ) )
110- optionHandlers [ opt ] ( cm , options [ opt ] , Init ) ;
111- maybeUpdateLineNumberWidth ( cm ) ;
112- for ( var i = 0 ; i < initHooks . length ; ++ i ) initHooks [ i ] ( cm ) ;
113- } ) ;
108+ for ( var opt in optionHandlers ) if ( optionHandlers . hasOwnProperty ( opt ) )
109+ optionHandlers [ opt ] ( this , options [ opt ] , Init ) ;
110+ maybeUpdateLineNumberWidth ( this ) ;
111+ for ( var i = 0 ; i < initHooks . length ; ++ i ) initHooks [ i ] ( this ) ;
112+ endOperation ( this ) ;
114113 }
115114
116115 // DISPLAY CONSTRUCTOR
You can’t perform that action at this time.
0 commit comments