mirror of
https://github.com/atom/atom.git
synced 2026-02-09 22:24:59 -05:00
Ignore bracket matching when there are multiple cursors
This commit is contained in:
@@ -307,6 +307,9 @@ class EditSession
|
||||
removeAnchorRange: (anchorRange) ->
|
||||
_.remove(@anchorRanges, anchorRange)
|
||||
|
||||
hasMultipleCursors: ->
|
||||
@getCursors().length > 1
|
||||
|
||||
getCursors: -> new Array(@cursors...)
|
||||
|
||||
getCursor: (index=0) ->
|
||||
|
||||
@@ -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])])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user