From bdf60997ea4a2aa8b14f46957afd5d575f628dfc Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 23 Jan 2013 12:06:06 -0800 Subject: [PATCH] :lipstick: --- src/app/language-mode.coffee | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/language-mode.coffee b/src/app/language-mode.coffee index 351dd122c..66caed8da 100644 --- a/src/app/language-mode.coffee +++ b/src/app/language-mode.coffee @@ -23,15 +23,15 @@ class LanguageMode return true if @editSession.hasMultipleCursors() cursorBufferPosition = @editSession.getCursorBufferPosition() - previousCharachter = @editSession.getTextInBufferRange([cursorBufferPosition.add([0, -1]), cursorBufferPosition]) - nextCharachter = @editSession.getTextInBufferRange([cursorBufferPosition, cursorBufferPosition.add([0,1])]) + previousCharacter = @editSession.getTextInBufferRange([cursorBufferPosition.add([0, -1]), cursorBufferPosition]) + nextCharacter = @editSession.getTextInBufferRange([cursorBufferPosition, cursorBufferPosition.add([0,1])]) - hasWordAfterCursor = /\w/.test(nextCharachter) - hasWordBeforeCursor = /\w/.test(previousCharachter) + hasWordAfterCursor = /\w/.test(nextCharacter) + hasWordBeforeCursor = /\w/.test(previousCharacter) autoCompleteOpeningBracket = @isOpeningBracket(text) and not hasWordAfterCursor and not (@isQuote(text) and hasWordBeforeCursor) skipOverExistingClosingBracket = false - if @isClosingBracket(text) and nextCharachter == text + if @isClosingBracket(text) and nextCharacter == text if bracketAnchorRange = @bracketAnchorRanges.filter((anchorRange) -> anchorRange.getBufferRange().end.isEqual(cursorBufferPosition))[0] skipOverExistingClosingBracket = true