mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Pop scope from the top of scopeStarts directly
This commit is contained in:
committed by
Nathan Sobo
parent
9a431a5c97
commit
e1b984820d
@@ -32,7 +32,14 @@ class TokenIterator
|
||||
tag = tags[@index]
|
||||
if tag < 0
|
||||
if tag % 2 is 0
|
||||
@scopeEnds.push(atom.grammars.scopeForId(tag + 1))
|
||||
scopeName = atom.grammars.scopeForId(tag + 1)
|
||||
if @scopeEnds.length is 0
|
||||
@scopeEnds.push(scopeName)
|
||||
else
|
||||
startsTop = this.scopeStarts.pop()
|
||||
if startsTop isnt scopeName
|
||||
@scopeStarts.push(startsTop)
|
||||
@scopeEnds.push(scopeName)
|
||||
@scopes.pop()
|
||||
else
|
||||
scope = atom.grammars.scopeForId(tag)
|
||||
|
||||
Reference in New Issue
Block a user