parent
95f2e23822
commit
c095930ba3
|
@ -16,7 +16,6 @@ class Application(object):
|
||||||
self.y, self.x = self.stdscr.getmaxyx()
|
self.y, self.x = self.stdscr.getmaxyx()
|
||||||
|
|
||||||
# initialize some basic stuff
|
# initialize some basic stuff
|
||||||
self.state = {}
|
|
||||||
self.config = {}
|
self.config = {}
|
||||||
self.highlighted_ranges = []
|
self.highlighted_ranges = []
|
||||||
self.mini_active = False
|
self.mini_active = False
|
||||||
|
@ -115,14 +114,12 @@ class Application(object):
|
||||||
|
|
||||||
# create all the insert methods for the character ranges we like
|
# create all the insert methods for the character ranges we like
|
||||||
for c in string.letters + string.digits + string.punctuation:
|
for c in string.letters + string.digits + string.punctuation:
|
||||||
obj = method.InsertString(c)
|
self.methods[obj.name] = method.InsertString(c)
|
||||||
self.methods[obj.name] = obj
|
self.methods[obj.name] = method.OverwriteChar(c)
|
||||||
obj = method.OverwriteChar(c)
|
|
||||||
self.methods[obj.name] = obj
|
|
||||||
|
|
||||||
# buffer list stuff
|
# buffer list stuff
|
||||||
height = self.y - 1
|
height = self.y - 1
|
||||||
width = self.x
|
width = self.x
|
||||||
self.bufferlist = bufferlist.BufferList(height, width)
|
self.bufferlist = bufferlist.BufferList(height, width)
|
||||||
self.active_slot = 0
|
self.active_slot = 0
|
||||||
self.complete_slot = None
|
self.complete_slot = None
|
||||||
|
|
|
@ -742,6 +742,7 @@ class Perl(mode.Fundamental):
|
||||||
self.context = PerlContext(self)
|
self.context = PerlContext(self)
|
||||||
self.functions = None
|
self.functions = None
|
||||||
self.funclines = None
|
self.funclines = None
|
||||||
|
self.perlinc = None
|
||||||
|
|
||||||
def find_module(self, module):
|
def find_module(self, module):
|
||||||
parts = module.split('::')
|
parts = module.split('::')
|
||||||
|
@ -756,9 +757,7 @@ class Perl(mode.Fundamental):
|
||||||
return path
|
return path
|
||||||
|
|
||||||
def get_inc(self):
|
def get_inc(self):
|
||||||
a = self.window.application
|
if self.perlinc is None:
|
||||||
a.state.setdefault('perl', {})
|
|
||||||
if 'inc' not in a.state['perl']:
|
|
||||||
perllib = a.config.get('perl.lib')
|
perllib = a.config.get('perl.lib')
|
||||||
if perllib:
|
if perllib:
|
||||||
cmd = "PERL5LIB=%r perl -e 'print join(\"\\n\", @INC);'" % perllib
|
cmd = "PERL5LIB=%r perl -e 'print join(\"\\n\", @INC);'" % perllib
|
||||||
|
@ -767,8 +766,8 @@ class Perl(mode.Fundamental):
|
||||||
(status, data) = commands.getstatusoutput(cmd)
|
(status, data) = commands.getstatusoutput(cmd)
|
||||||
if status != 0:
|
if status != 0:
|
||||||
raise Exception, "%r failed" % cmd
|
raise Exception, "%r failed" % cmd
|
||||||
a.state['perl']['inc'] = data.split('\n')
|
self.perlinc = data.split('\n')
|
||||||
return a.state['perl']['inc']
|
return self.perlinc
|
||||||
|
|
||||||
def get_functions(self):
|
def get_functions(self):
|
||||||
return self.context.get_names()
|
return self.context.get_names()
|
||||||
|
|
|
@ -130,12 +130,14 @@ class Sql(mode.Fundamental):
|
||||||
'sql_type': ('green', 'default', 'bold'),
|
'sql_type': ('green', 'default', 'bold'),
|
||||||
'sql_builtin': ('yellow', 'default', 'bold'),
|
'sql_builtin': ('yellow', 'default', 'bold'),
|
||||||
'sql_quoted.start': ('yellow', 'default', 'bold'),
|
'sql_quoted.start': ('yellow', 'default', 'bold'),
|
||||||
|
'sql_quoted.data': ('yellow', 'default', 'bold'),
|
||||||
'sql_quoted.null': ('yellow', 'default', 'bold'),
|
'sql_quoted.null': ('yellow', 'default', 'bold'),
|
||||||
'sql_quoted.end': ('yellow', 'default', 'bold'),
|
'sql_quoted.end': ('yellow', 'default', 'bold'),
|
||||||
'sql_variable': ('yellow', 'default', 'bold'),
|
'sql_variable': ('yellow', 'default', 'bold'),
|
||||||
'sql_bareword': ('default', 'default', 'bold'),
|
'sql_bareword': ('default', 'default', 'bold'),
|
||||||
|
|
||||||
'function.start': ('cyan', 'default', 'bold'),
|
'function.start': ('cyan', 'default', 'bold'),
|
||||||
|
'function.data': ('default', 'default', 'bold'),
|
||||||
'function.null': ('default', 'default', 'bold'),
|
'function.null': ('default', 'default', 'bold'),
|
||||||
'function.name': ('magenta', 'default', 'bold'),
|
'function.name': ('magenta', 'default', 'bold'),
|
||||||
'function.language': ('magenta', 'default', 'bold'),
|
'function.language': ('magenta', 'default', 'bold'),
|
||||||
|
@ -143,6 +145,7 @@ class Sql(mode.Fundamental):
|
||||||
|
|
||||||
'function.definition.start': ('magenta', 'default', 'bold'),
|
'function.definition.start': ('magenta', 'default', 'bold'),
|
||||||
'function.definition.sql_bareword': ('magenta', 'default', 'bold'),
|
'function.definition.sql_bareword': ('magenta', 'default', 'bold'),
|
||||||
|
'function.definition.data': ('magenta', 'default', 'bold'),
|
||||||
'function.definition.null': ('magenta', 'default', 'bold'),
|
'function.definition.null': ('magenta', 'default', 'bold'),
|
||||||
'function.definition.end': ('magenta', 'default', 'bold'),
|
'function.definition.end': ('magenta', 'default', 'bold'),
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue