Ignore bracket matching when there are multiple cursors

This commit is contained in:
Corey Johnson & Nathan Sobo
2012-08-01 09:40:50 -07:00
parent 97b492edfc
commit a589557aaa
3 changed files with 16 additions and 0 deletions

View File

@@ -307,6 +307,9 @@ class EditSession
removeAnchorRange: (anchorRange) ->
_.remove(@anchorRanges, anchorRange)
hasMultipleCursors: ->
@getCursors().length > 1
getCursors: -> new Array(@cursors...)
getCursor: (index=0) ->

View File

@@ -17,6 +17,8 @@ class LanguageMode
@aceAdaptor = new AceAdaptor(@editSession)
_.adviseBefore @editSession, 'insertText', (text) =>
return true if @editSession.hasMultipleCursors()
cursorBufferPosition = @editSession.getCursorBufferPosition()
nextCharachter = @editSession.getTextInBufferRange([cursorBufferPosition, cursorBufferPosition.add([0, 1])])