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