Basic substitution works

This commit is contained in:
Corey Johnson & Nathan Sobo
2012-03-21 14:45:28 -07:00
parent e786bb8055
commit c174242aab
2 changed files with 3 additions and 5 deletions

View File

@@ -7,8 +7,6 @@ class Substitution
{ buffer } = editor
selectedText = editor.getSelectedText()
# console.log editor.getSelection().getBufferRange()
selectionStartIndex = buffer.characterIndexForPosition(editor.getSelection().getBufferRange().start)
match = @findRegex.exec(selectedText)
@@ -18,5 +16,5 @@ class Substitution
startPosition = buffer.positionForCharacterIndex(matchStartIndex)
endPosition = buffer.positionForCharacterIndex(matchEndIndex)
buffer.change([startPosition, endPosition], @replace)
buffer.change([startPosition, endPosition], @replaceText)