mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
Pass translation options through when setting buffer position
This commit is contained in:
@@ -1091,7 +1091,7 @@ describe "Editor", ->
|
||||
expect(editor.renderedLines.find('.line:eq(3)').text()).toBe " var pivot = items.shift(), current, left = [], "
|
||||
expect(editor.renderedLines.find('.line:eq(4)').text()).toBe "right = [];"
|
||||
|
||||
editor.setCursorBufferPosition([3, 51])
|
||||
editor.setCursorBufferPosition([3, 51], wrapAtSoftNewlines: true)
|
||||
expect(editor.find('.cursor').offset()).toEqual(editor.renderedLines.find('.line:eq(4)').offset())
|
||||
|
||||
editor.setCursorBufferPosition([4, 0])
|
||||
|
||||
@@ -430,8 +430,8 @@ class EditSession
|
||||
getCursorScreenPosition: ->
|
||||
@getLastCursor().getScreenPosition()
|
||||
|
||||
setCursorBufferPosition: (position) ->
|
||||
@moveCursors (cursor) -> cursor.setBufferPosition(position)
|
||||
setCursorBufferPosition: (position, options) ->
|
||||
@moveCursors (cursor) -> cursor.setBufferPosition(position, options)
|
||||
|
||||
getCursorBufferPosition: ->
|
||||
@getLastCursor().getBufferPosition()
|
||||
|
||||
@@ -178,7 +178,7 @@ class Editor extends View
|
||||
moveCursorToEndOfLine: -> @activeEditSession.moveCursorToEndOfLine()
|
||||
setCursorScreenPosition: (position) -> @activeEditSession.setCursorScreenPosition(position)
|
||||
getCursorScreenPosition: -> @activeEditSession.getCursorScreenPosition()
|
||||
setCursorBufferPosition: (position) -> @activeEditSession.setCursorBufferPosition(position)
|
||||
setCursorBufferPosition: (position, options) -> @activeEditSession.setCursorBufferPosition(position, options)
|
||||
getCursorBufferPosition: -> @activeEditSession.getCursorBufferPosition()
|
||||
|
||||
getSelection: (index) -> @activeEditSession.getSelection(index)
|
||||
|
||||
Reference in New Issue
Block a user