fixed highlighting bug

--HG--
branch : pmacs2
This commit is contained in:
moculus 2007-06-22 22:17:43 +00:00
parent 094ac8193f
commit 8cfba810a5
1 changed files with 3 additions and 7 deletions

View File

@ -131,15 +131,11 @@ class Highlighter:
getnext = True
elif old_token == new_token:
# if they match, then leave the old one alone
#if i > 1:
# raise Exception, "A %r == %r" % (old_token, new_token)
i += 1
getnext = True
if new_token.y >= y2 and new_token.end_x() >= x2:
#if i > 1:
# raise Exception, "B %r == %r" % (old_token, new_token)
# in this case, we can (probably) assume that the rest of
# the lines will lex the same way
if new_token.y > y2:
# in this case, we can be sure that the rest of the lines
# will lex the same way
break
elif old_token.x < new_token.end_x():
# ok, so we haven't gotten to this new token yet. obviously