mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Basic substitution works
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user