mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Make bracket matcher work with new marker API
This commit is contained in:
@@ -168,11 +168,11 @@ module.exports =
|
||||
autoCompleteOpeningBracket = @isOpeningBracket(text) and not hasWordAfterCursor and not (@isQuote(text) and hasWordBeforeCursor)
|
||||
skipOverExistingClosingBracket = false
|
||||
if @isClosingBracket(text) and nextCharacter == text
|
||||
if bracketMarker = _.find(@bracketMarkers, (marker) => editSession.getMarkerBufferRange(marker)?.end.isEqual(cursorBufferPosition))
|
||||
if bracketMarker = _.find(@bracketMarkers, (marker) => marker.isValid() and marker.getBufferRange().end.isEqual(cursorBufferPosition))
|
||||
skipOverExistingClosingBracket = true
|
||||
|
||||
if skipOverExistingClosingBracket
|
||||
editSession.destroyMarker(bracketMarker)
|
||||
bracketMarker.destroy()
|
||||
_.remove(@bracketMarkers, bracketMarker)
|
||||
editSession.moveCursorRight()
|
||||
false
|
||||
|
||||
Reference in New Issue
Block a user