use the local selection instance

This commit is contained in:
Chris Wanstrath
2012-10-08 20:13:16 -07:00
parent f5f18abbf0
commit fa10a8e6ac

View File

@@ -508,13 +508,13 @@ class EditSession
transpose: ->
@mutateSelectedText (selection) =>
if selection.isEmpty()
@selectRight()
selection.selectRight()
text = selection.getText()
selection.delete()
@moveCursorLeft()
@insertText text
selection.cursor.moveLeft()
selection.insertText text
else
@insertText selection.getText().split('').reverse().join('')
selection.insertText selection.getText().split('').reverse().join('')
expandLastSelectionOverLine: ->
@getLastSelection().expandOverLine()