Add setTextInBufferRange to edit session

This commit is contained in:
Corey Johnson
2012-08-09 10:32:20 -07:00
parent 34cac4336b
commit ea86ec401b
2 changed files with 5 additions and 3 deletions

View File

@@ -121,6 +121,9 @@ class Buffer
return multipleLines.join '\n'
setTextInRange: (range, text) ->
@change(range, text)
getLines: ->
@lines

View File

@@ -111,6 +111,8 @@ class EditSession
indentationForBufferRow: (bufferRow) -> @buffer.indentationForRow(bufferRow)
getEofBufferPosition: -> @buffer.getEofPosition()
getLastBufferRow: -> @buffer.getLastRow()
getTextInBufferRange: (range) -> @buffer.getTextInRange(range)
setTextInBufferRange: (range, text) -> @buffer.setTextInRange(range, text)
bufferRangeForBufferRow: (row) -> @buffer.rangeForRow(row)
lineForBufferRow: (row) -> @buffer.lineForRow(row)
scanInRange: (args...) -> @buffer.scanInRange(args...)
@@ -419,9 +421,6 @@ class EditSession
getSelectedText: ->
@getLastSelection().getText()
getTextInBufferRange: (range) ->
@buffer.getTextInRange(range)
moveCursorUp: ->
@moveCursors (cursor) -> cursor.moveUp()