mirror of
https://github.com/atom/atom.git
synced 2026-01-23 22:08:08 -05:00
Set the lines div height explicitly so it can be > 100% of parent
All editor specs pass
This commit is contained in:
@@ -483,6 +483,8 @@ fdescribe "Editor", ->
|
||||
describe "when the font size changes on the view", ->
|
||||
it "updates the font sizes of editors and recalculates dimensions critical to cursor positioning", ->
|
||||
rootView.attachToDom()
|
||||
rootView.height(200)
|
||||
rootView.width(200)
|
||||
rootView.setFontSize(10)
|
||||
lineHeightBefore = editor.lineHeight
|
||||
charWidthBefore = editor.charWidth
|
||||
|
||||
@@ -868,8 +868,10 @@ class Editor extends View
|
||||
@renderedLines.css('padding-bottom', paddingBottom)
|
||||
@gutter.lineNumbers.css('padding-bottom', paddingBottom)
|
||||
|
||||
@underlayer.height(@screenLineCount() * @lineHeight)
|
||||
@overlayer.height(@screenLineCount() * @lineHeight)
|
||||
linesHeight = @screenLineCount() * @lineHeight
|
||||
@renderedLines.height(linesHeight)
|
||||
@underlayer.height(linesHeight)
|
||||
@overlayer.height(linesHeight)
|
||||
|
||||
getFirstVisibleScreenRow: ->
|
||||
Math.floor(@scrollTop() / @lineHeight)
|
||||
|
||||
Reference in New Issue
Block a user