@@ -36,6 +36,7 @@ D.Ed=function(ide,opts){ //constructor
3636 ed [ c ] ?ed [ c ] ( ed . cm ) :CM . commands [ c ] ?CM . commands [ c ] ( ed . cm ) :0 ; return ! 1 }
3737 }
3838 ed . setTC ( ! ! ed . tc ) ; this . vt = D . vt ( this ) ; this . setLN ( D . prf . lineNums ( ) )
39+ ed . firstOpen = true ;
3940}
4041D . Ed . prototype = {
4142 updGutters :function ( ) {
@@ -92,7 +93,7 @@ D.Ed.prototype={
9293 this . jumps . forEach ( function ( x ) { x . n = x . lh . lineNo ( ) } ) //to preserve jumps, convert LineHandle-s to line numbers
9394 cm . setValue ( ed . oText = ee . text . join ( '\n' ) ) //.setValue() invalidates old LineHandle-s
9495 this . jumps . forEach ( function ( x ) { x . lh = cm . getLineHandle ( x . n ) ; delete x . n } ) //look up new LineHandle-s, forget numbers
95- cm . clearHistory ( )
96+ cm . clearHistory ( ) ;
9697 if ( D . mac ) { cm . focus ( ) ; window . focus ( ) }
9798 //entityType: 16 NestedArray 512 AplClass
9899 // 1 DefinedFunction 32 QuadORObject 1024 AplInterface
@@ -109,7 +110,7 @@ D.Ed.prototype={
109110 ed . dom . getElementsByClassName ( "tb_RP" ) [ 0 ] . style . display = "none"
110111 }
111112 var line = ee . currentRow , col = ee . currentColumn || 0
112- if ( line === 0 && col === 0 && ee . text . length === 1 ) col = ee . text [ 0 ] . length
113+ if ( line === 0 && col === 0 && ee . text . length === 1 && / \s ? [ a - z | @ ] + $ / . test ( ee . text [ 0 ] ) ) col = ee . text [ 0 ] . length
113114 cm . setCursor ( line , col ) ; cm . scrollIntoView ( null , cm . getScrollInfo ( ) . clientHeight / 2 )
114115 ed . oStop = ( ee . stop || [ ] ) . slice ( 0 ) . sort ( function ( x , y ) { return x - y } )
115116 for ( var k = 0 ; k < ed . oStop . length ; k ++ ) cm . setGutterMarker ( ed . oStop [ k ] , 'breakpoints' , ed . createBPEl ( ) )
0 commit comments