fixed stupid bug

--HG--
branch : pmacs2
This commit is contained in:
moculus 2007-06-26 15:58:18 +00:00
parent 6e116db9ae
commit 3984d7912c
2 changed files with 2 additions and 1 deletions

View File

@ -101,6 +101,7 @@ class PerlTabber(tab2.StackTabber):
def is_base(self, y): def is_base(self, y):
if y == 0: if y == 0:
return True return True
return False
highlighter = self.mode.window.buffer.highlights[self.mode.name()] highlighter = self.mode.window.buffer.highlights[self.mode.name()]
if not highlighter.tokens[y]: if not highlighter.tokens[y]:
return False return False

View File

@ -102,13 +102,13 @@ class StackTabber(Tabber):
def _calc_level(self, y): def _calc_level(self, y):
# first we need to step back to find the last place where we have tab # first we need to step back to find the last place where we have tab
# stops figured out, or a suitable place to start # stops figured out, or a suitable place to start
target = y
while not self.is_base(y) and y > 0: while not self.is_base(y) and y > 0:
y -= 1 y -= 1
# ok now, let's do this shit # ok now, let's do this shit
self.markers = [] self.markers = []
currlvl = 0 currlvl = 0
target = y
while y <= target: while y <= target:
currlvl = self.get_curr_level() currlvl = self.get_curr_level()
tokens = self.get_tokens(y) tokens = self.get_tokens(y)