mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Fix double autoscroll when moving cursor
This commit is contained in:
@@ -992,6 +992,13 @@ describe "TextEditor", ->
|
||||
editor.undo()
|
||||
expect(editor.getScrollTop()).toBe 0
|
||||
|
||||
it "doesn't scroll when the cursor moves into the visible area", ->
|
||||
editor.setCursorBufferPosition([0, 0])
|
||||
editor.setScrollTop(40)
|
||||
expect(editor.getVisibleRowRange()).toEqual([4, 9])
|
||||
editor.setCursorBufferPosition([6, 0])
|
||||
expect(editor.getScrollTop()).toBe 40
|
||||
|
||||
it "honors the autoscroll option on cursor and selection manipulation methods", ->
|
||||
expect(editor.getScrollTop()).toBe 0
|
||||
editor.addCursorAtScreenPosition([11, 11], autoscroll: false)
|
||||
|
||||
Reference in New Issue
Block a user