From c4ceafd22d6afb876d316a4233a8e37a25762ae9 Mon Sep 17 00:00:00 2001 From: moculus Date: Tue, 26 Jun 2007 20:27:22 +0000 Subject: [PATCH] tabbing bug --HG-- branch : pmacs2 --- mode_perl.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/mode_perl.py b/mode_perl.py index b7606ab..4a6a951 100644 --- a/mode_perl.py +++ b/mode_perl.py @@ -114,10 +114,11 @@ class PerlTabber(tab2.StackTabber): self._opt_pop('cont') currlvl = tab2.StackTabber._handle_close_token(self, currlvl, y, i) token = self.get_token(y, i) - if token.string == '}': - self._opt_pop('cont') - elif self.is_rightmost_token(y, i): - self._opt_append('cont', currlvl + 4) + if self.is_rightmost_token(y, i): + if token.string == '}': + self._opt_pop('cont') + else: + self._opt_append('cont', currlvl + 4) return currlvl def _handle_other_token(self, currlvl, y, i): token = self.get_token(y, i)