parent
c57abb9c87
commit
4ff226ce6b
|
@ -69,13 +69,12 @@ class Application(object):
|
|||
|
||||
# this is how we can change color settings
|
||||
if curses.can_change_color():
|
||||
#curses.init_color(curses.COLOR_YELLOW, 750, 766, 888)
|
||||
#curses.init_color(curses.COLOR_BLUE, 750, 400, 0)
|
||||
#curses.init_color(curses.COLOR_YELLOW, 222, 400, 900)
|
||||
#curses.init_color(curses.COLOR_GREEN, 222, 400, 900)
|
||||
#curses.init_color(curses.COLOR_RED, 222, 400, 222)
|
||||
pass
|
||||
else:
|
||||
#raise Exception("urk")
|
||||
self.set_error("Dynamic color not available")
|
||||
color.init()
|
||||
|
||||
|
|
21
lex.py
21
lex.py
|
@ -391,16 +391,17 @@ class OverrideRegionRule(RegionRule):
|
|||
d = m.groupdict()
|
||||
if 'grammar' in d:
|
||||
a = lexer.mode.window.application
|
||||
modecls = a.modes[d['grammar'].lower()]
|
||||
mode = modecls(FakeWindow(lexer.mode.window.application))
|
||||
assert hasattr(mode, 'grammar') and hasattr(mode, 'colors')
|
||||
|
||||
if parent is None:
|
||||
path = self.name
|
||||
else:
|
||||
path = parent.domain() + '.' + self.name
|
||||
lexer.mode.gstack[path] = mode
|
||||
|
||||
name = d['grammar'].lower()
|
||||
if name in a.modes:
|
||||
modecls = a.modes[name]
|
||||
mode = modecls(FakeWindow(lexer.mode.window.application))
|
||||
assert hasattr(mode, 'grammar') and hasattr(mode, 'colors')
|
||||
|
||||
if parent is None:
|
||||
path = self.name
|
||||
else:
|
||||
path = parent.domain() + '.' + self.name
|
||||
lexer.mode.gstack[path] = mode
|
||||
return RegionRule.lex(self, lexer, parent, m)
|
||||
|
||||
class Grammar(object):
|
||||
|
|
11
mode/perl.py
11
mode/perl.py
|
@ -755,7 +755,7 @@ class Perl(mode.Fundamental):
|
|||
self.add_bindings('close-paren', (')'))
|
||||
self.add_bindings('close-bracket', (']'))
|
||||
self.add_bindings('close-brace', ('}'))
|
||||
self.context = PerlContext(self)
|
||||
#self.context = PerlContext(self)
|
||||
self.functions = None
|
||||
self.funclines = None
|
||||
self.perlinc = None
|
||||
|
@ -789,10 +789,13 @@ class Perl(mode.Fundamental):
|
|||
return self.perlinc
|
||||
|
||||
def get_functions(self):
|
||||
return self.context.get_names()
|
||||
#return self.context.get_names()
|
||||
return {}
|
||||
def get_function_names(self):
|
||||
return self.context.get_name_list()
|
||||
#return self.context.get_name_list()
|
||||
return {}
|
||||
def get_line_function(self, y):
|
||||
return self.context.get_line_name(y)
|
||||
#return self.context.get_line_name(y)
|
||||
return {}
|
||||
|
||||
install = Perl.install
|
||||
|
|
Loading…
Reference in New Issue