Editor.renderedLines' width is set to the maximum of either Editor.scrollView's width or the maximum rendered line width

This commit is contained in:
Corey Johnson & Nathan Sobo
2012-07-13 09:05:38 -07:00
parent c39172d625
commit d44c648d4b
3 changed files with 12 additions and 6 deletions

View File

@@ -650,7 +650,11 @@ class Editor extends View
@renderedLines.css('padding-bottom', heightOfRenderedLines)
adjustWidthOfRenderedLines: ->
@renderedLines.width(@charWidth * @maxScreenLineLength())
width = @charWidth * @maxScreenLineLength()
if width > @scrollView.width()
@renderedLines.width(width)
else
@renderedLines.width(@scrollView.width())
handleScrollHeightChange: ->
scrollHeight = @lineHeight * @screenLineCount()