mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-14 04:29:04 +03:00
Rename Editor.lastRow to Editor.lastScreenRow
This commit is contained in:
parent
5e5cd980f3
commit
140234fd12
@ -107,10 +107,10 @@ describe "Editor", ->
|
||||
expect(editor.setMaxLineLength).not.toHaveBeenCalled()
|
||||
|
||||
it "allows the cursor to move down to the last line", ->
|
||||
_.times editor.lastRow(), -> editor.moveCursorDown()
|
||||
expect(editor.getCursorScreenPosition()).toEqual [editor.lastRow(), 0]
|
||||
_.times editor.getLastScreenRow(), -> editor.moveCursorDown()
|
||||
expect(editor.getCursorScreenPosition()).toEqual [editor.getLastScreenRow(), 0]
|
||||
editor.moveCursorDown()
|
||||
expect(editor.getCursorScreenPosition()).toEqual [editor.lastRow(), 2]
|
||||
expect(editor.getCursorScreenPosition()).toEqual [editor.getLastScreenRow(), 2]
|
||||
|
||||
it "allows the cursor to move up to a shorter soft wrapped line", ->
|
||||
editor.setCursorScreenPosition([11, 15])
|
||||
|
@ -170,7 +170,7 @@ class Editor extends View
|
||||
renderLines: ->
|
||||
@lineCache = []
|
||||
@lines.find('.line').remove()
|
||||
@insertLineElements(0, @buildLineElements(0, @lastRow()))
|
||||
@insertLineElements(0, @buildLineElements(0, @getLastScreenRow()))
|
||||
|
||||
getScreenLines: ->
|
||||
@renderer.getLines()
|
||||
@ -181,7 +181,7 @@ class Editor extends View
|
||||
screenLineCount: ->
|
||||
@renderer.lineCount()
|
||||
|
||||
lastRow: ->
|
||||
getLastScreenRow: ->
|
||||
@screenLineCount() - 1
|
||||
|
||||
setBuffer: (buffer) ->
|
||||
|
Loading…
Reference in New Issue
Block a user