Home Download Buy Blog Forum Support

Nested scopes trip up selector for syntax highlighting et al

Nested scopes trip up selector for syntax highlighting et al

Postby sublimator on Fri Feb 10, 2012 11:39 am

# Syntax highlighting / scope selector bug:
{"a": {"a":{"a":{"a":{"a":{"a":{"a":{"a":[ (lambda s: s)("ssstarstarst")]}}}}}}}}
#./.
# The `scope` up here --/
# ./
>>> scope = (21 * 'meta.bla ') + 'string'
>>> sublime.score_selector(scope, 'string')
0L

# What about something *slightly* less nested:
{"a":{"a":{"a":{"a":{"a":{"a":{"a":[ (lambda s: s)("ssstarstarst")]}}}}}}}
#./.
# The `scope` up here --/
# ./
>>> scope = (20 * 'meta.bla ') + 'string'
>>> sublime.score_selector(scope, 'string')
9223372036854775808L

# Hrmmmm:
>>> import math
>>> math.log(sublime.score_selector(scope, 'string'), 2)
63.0

# Could it be 64 bit unsigned ints are used internally and a 66bit int would
# faff it up?
It is better to remain silent and be thought a fool, than to speak out and remove all doubt
sublimator
 
Posts: 649
Joined: Thu Mar 20, 2008 5:41 am

Return to Technical Support

Who is online

Users browsing this forum: No registered users and 13 guests