mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
Use backwardsScanInRange instead of passing true
This commit is contained in:
@@ -116,14 +116,13 @@ module.exports =
|
||||
regex = new RegExp("[#{_.escapeRegExp(startPair + endPair)}]", 'g')
|
||||
startPairPosition = null
|
||||
unpairedCount = 0
|
||||
scanner = (match, range, {stop}) =>
|
||||
buffer.backwardsScanInRange regex, scanRange, (match, range, {stop}) =>
|
||||
if match[0] is endPair
|
||||
unpairedCount++
|
||||
else if match[0] is startPair
|
||||
unpairedCount--
|
||||
startPairPosition = range.start
|
||||
stop() if unpairedCount < 0
|
||||
buffer.scanInRange(regex, scanRange, scanner, true)
|
||||
startPairPosition
|
||||
|
||||
updateMatch: (editor) ->
|
||||
|
||||
Reference in New Issue
Block a user