Autoscroll *after* inserting text, not before

Fixes #2787
This commit is contained in:
Nathan Sobo
2014-07-03 14:47:28 -06:00
parent 6c8b4de986
commit 260be2e096
2 changed files with 10 additions and 1 deletions

View File

@@ -785,6 +785,13 @@ describe "Editor", ->
editor.moveCursorLeft()
expect(editor.getScrollLeft()).toBe 58 * 10
it "scrolls down when inserting lines makes the document longer than the editor's height", ->
editor.setCursorScreenPosition([13, Infinity])
editor.insertNewline()
expect(editor.getScrollBottom()).toBe 14 * 10
editor.insertNewline()
expect(editor.getScrollBottom()).toBe 15 * 10
describe "selection", ->
selection = null