mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Remove the bottomPaddingInLines from editor
This commit is contained in:
@@ -317,7 +317,7 @@ describe "Editor", ->
|
||||
expect(editor.charWidth).toBeGreaterThan charWidthBefore
|
||||
expect(editor.getCursorView().position()).toEqual { top: 5 * editor.lineHeight, left: 6 * editor.charWidth }
|
||||
expect(editor.renderedLines.outerHeight()).toBe buffer.getLineCount() * editor.lineHeight
|
||||
expect(editor.verticalScrollbarContent.height()).toBe (buffer.getLineCount() + editor.bottomPaddingInLines) * editor.lineHeight
|
||||
expect(editor.verticalScrollbarContent.height()).toBe buffer.getLineCount() * editor.lineHeight
|
||||
|
||||
newEditor = new Editor(editor.activeEditSession.copy())
|
||||
editor.remove()
|
||||
@@ -1297,7 +1297,6 @@ describe "Editor", ->
|
||||
|
||||
describe "when lines are removed", ->
|
||||
beforeEach ->
|
||||
editor.bottomPaddingInLines = 0
|
||||
editor.attachToDom(heightInLines: 5)
|
||||
|
||||
it "sets the rendered screen line's width to either the max line length or the scollView's width (whichever is greater)", ->
|
||||
@@ -1392,7 +1391,6 @@ describe "Editor", ->
|
||||
describe "when autoscrolling at the end of the document", ->
|
||||
it "renders lines properly", ->
|
||||
editor.edit(project.buildEditSession('two-hundred.txt'))
|
||||
editor.bottomPaddingInLines = 0
|
||||
editor.attachToDom(heightInLines: 5.5)
|
||||
|
||||
expect(editor.renderedLines.find('.line').length).toBe 8
|
||||
|
||||
@@ -1272,14 +1272,10 @@ class Editor extends View
|
||||
height = @lineHeight * @getScreenLineCount()
|
||||
unless @layerHeight == height
|
||||
@layerHeight = height
|
||||
@underlayer.height(@layerHeight)
|
||||
@renderedLines.height(@layerHeight)
|
||||
@overlayer.height(@layerHeight)
|
||||
|
||||
bottomPaddingInLines = if @mini then 0 else @bottomPaddingInLines
|
||||
heightWithPadding = @layerHeight + (@lineHeight * bottomPaddingInLines)
|
||||
@verticalScrollbarContent.height(heightWithPadding)
|
||||
@underlayer.height(heightWithPadding)
|
||||
|
||||
@verticalScrollbarContent.height(@layerHeight)
|
||||
@scrollBottom(height) if @scrollBottom() > height
|
||||
|
||||
minWidth = @charWidth * @maxScreenLineLength() + 20
|
||||
|
||||
Reference in New Issue
Block a user