@@ -103,11 +103,6 @@ var Split = function(){
103103exports . singleLineEditor = function ( el ) {
104104 var renderer = new Renderer ( el ) ;
105105 el . style . overflow = "hidden" ;
106- renderer . scrollBar . element . style . top = "0" ;
107- renderer . scrollBar . element . style . display = "none" ;
108- renderer . scrollBar . orginalWidth = renderer . scrollBar . width ;
109- renderer . scrollBar . width = 0 ;
110- renderer . content . style . height = "auto" ;
111106
112107 renderer . screenToTextCoordinates = function ( x , y ) {
113108 var pos = this . pixelToScreenCoordinates ( x , y ) ;
@@ -117,61 +112,7 @@ exports.singleLineEditor = function(el) {
117112 ) ;
118113 } ;
119114
120- renderer . maxLines = 4 ;
121- renderer . $computeLayerConfigWithScroll = renderer . $computeLayerConfig ;
122- renderer . $computeLayerConfig = function ( ) {
123- var config = this . layerConfig ;
124- var height = this . session . getScreenLength ( ) * this . lineHeight ;
125- if ( config . height != height ) {
126- var vScroll = height > this . maxLines * this . lineHeight ;
127-
128- if ( vScroll != this . $vScroll ) {
129- if ( vScroll ) {
130- this . scrollBar . element . style . display = "" ;
131- this . scrollBar . width = this . scrollBar . orginalWidth ;
132- this . container . style . height = config . height + "px" ;
133- height = config . height ;
134- this . scrollTop = height - this . maxLines * this . lineHeight ;
135- } else {
136- this . scrollBar . element . style . display = "none" ;
137- this . scrollBar . width = 0 ;
138- }
139-
140- this . onResize ( ) ;
141- this . $vScroll = vScroll ;
142- }
143-
144- if ( this . $vScroll )
145- return renderer . $computeLayerConfigWithScroll ( ) ;
146-
147- this . container . style . height = height + "px" ;
148- this . scroller . style . height = height + "px" ;
149- this . content . style . height = height + "px" ;
150- this . _emit ( "resize" ) ;
151- }
152-
153- var longestLine = this . $getLongestLine ( ) ;
154- var firstRow = 0 ;
155- var lastRow = this . session . getLength ( ) ;
156-
157- this . scrollTop = 0 ;
158- config . width = longestLine ;
159- config . padding = this . $padding ;
160- config . firstRow = 0 ;
161- config . firstRowScreen = 0 ;
162- config . lastRow = lastRow ;
163- config . lineHeight = this . lineHeight ;
164- config . characterWidth = this . characterWidth ;
165- config . minHeight = height ;
166- config . maxHeight = height ;
167- config . offset = 0 ;
168- config . height = height ;
169-
170- this . $gutterLayer . element . style . marginTop = 0 + "px" ;
171- this . content . style . marginTop = 0 + "px" ;
172- this . content . style . width = longestLine + 2 * this . $padding + "px" ;
173- } ;
174- renderer . isScrollableBy = function ( ) { return false } ;
115+ renderer . $maxLines = 4 ;
175116
176117 renderer . setStyle ( "ace_one-line" ) ;
177118 var editor = new Editor ( renderer ) ;
@@ -182,7 +123,6 @@ exports.singleLineEditor = function(el) {
182123 editor . setShowPrintMargin ( false ) ;
183124 editor . renderer . setShowGutter ( false ) ;
184125 editor . renderer . setHighlightGutterLine ( false ) ;
185-
186126 editor . $mouseHandler . $focusWaitTimout = 0 ;
187127
188128 return editor ;
0 commit comments