parent
76d7f942bf
commit
b145f252c8
|
@ -112,9 +112,7 @@ class PerlTabber(tab2.StackTabber):
|
|||
if not highlighter.tokens[y]:
|
||||
return False
|
||||
t = highlighter.tokens[y][0]
|
||||
if t.name == 'keyword' and t.string == 'sub':
|
||||
return True
|
||||
return False
|
||||
return t.name == 'keyword' and t.string == 'sub':
|
||||
def _handle_open_token(self, currlvl, y, i):
|
||||
currlvl = tab2.StackTabber._handle_open_token(self, currlvl, y, i)
|
||||
return currlvl
|
||||
|
|
|
@ -121,13 +121,14 @@ class PythonGrammar(Grammar):
|
|||
]
|
||||
|
||||
class PythonTabber(tab2.Tabber):
|
||||
start_tags = {'(': ')',
|
||||
'{': '}',
|
||||
'[': ']'}
|
||||
|
||||
close_tags = {')': '(',
|
||||
'}': '{',
|
||||
']': '['}
|
||||
def is_base(self, y):
|
||||
if y == 0:
|
||||
return True
|
||||
highlighter = self.mode.window.buffer.highlights[self.mode.name()]
|
||||
if not highlighter.tokens[y]:
|
||||
return False
|
||||
t = highlighter.tokens[y][0]
|
||||
return t.name == 'keyword' and t.string == 'def':
|
||||
|
||||
def __init__(self, m):
|
||||
tab2.Tabber.__init__(self, m)
|
||||
|
|
Loading…
Reference in New Issue