mirror of
https://github.com/atom/atom.git
synced 2026-01-23 22:08:08 -05:00
💚
This commit is contained in:
@@ -4379,7 +4379,7 @@ describe "TextEditor", ->
|
||||
describe ".pageUp/Down()", ->
|
||||
it "moves the cursor down one page length", ->
|
||||
editor.setLineHeightInPixels(10)
|
||||
editor.setHeight(50)
|
||||
editor.setHeight(50, true)
|
||||
expect(editor.getCursorBufferPosition().row).toBe 0
|
||||
|
||||
editor.pageDown()
|
||||
@@ -4397,7 +4397,7 @@ describe "TextEditor", ->
|
||||
describe ".selectPageUp/Down()", ->
|
||||
it "selects one screen height of text up or down", ->
|
||||
editor.setLineHeightInPixels(10)
|
||||
editor.setHeight(50)
|
||||
editor.setHeight(50, true)
|
||||
expect(editor.getCursorBufferPosition().row).toBe 0
|
||||
|
||||
editor.selectPageDown()
|
||||
|
||||
@@ -687,7 +687,7 @@ class TextEditorPresenter
|
||||
return unless @height? and @horizontalScrollbarHeight?
|
||||
|
||||
clientHeight = @height - @horizontalScrollbarHeight
|
||||
@model.setHeight(clientHeight)
|
||||
@model.setHeight(clientHeight, true)
|
||||
|
||||
unless @clientHeight is clientHeight
|
||||
@clientHeight = clientHeight
|
||||
@@ -698,7 +698,7 @@ class TextEditorPresenter
|
||||
return unless @contentFrameWidth? and @verticalScrollbarWidth?
|
||||
|
||||
clientWidth = @contentFrameWidth - @verticalScrollbarWidth
|
||||
@model.setWidth(clientWidth) unless @editorWidthInChars
|
||||
@model.setWidth(clientWidth, true) unless @editorWidthInChars
|
||||
|
||||
unless @clientWidth is clientWidth
|
||||
@clientWidth = clientWidth
|
||||
|
||||
@@ -2991,7 +2991,7 @@ class TextEditor extends Model
|
||||
|
||||
getHeight: ->
|
||||
Grim.deprecate("This is now a view method. Call TextEditorElement::getHeight instead.")
|
||||
atom.views.getView(this).getHeight()
|
||||
@displayBuffer.getHeight()
|
||||
|
||||
getClientHeight: -> @displayBuffer.getClientHeight()
|
||||
|
||||
@@ -3004,7 +3004,7 @@ class TextEditor extends Model
|
||||
|
||||
getWidth: ->
|
||||
Grim.deprecate("This is now a view method. Call TextEditorElement::getWidth instead.")
|
||||
atom.views.getView(this).getWidth()
|
||||
@displayBuffer.getWidth()
|
||||
|
||||
getScrollRow: -> @scrollRow
|
||||
setScrollRow: (@scrollRow) ->
|
||||
|
||||
Reference in New Issue
Block a user