parent
510e98dc92
commit
4fb7ca5c53
|
@ -2,7 +2,7 @@
|
|||
import curses, curses.ascii, getpass, os, re, string, sys, termios, time
|
||||
import traceback
|
||||
from subprocess import Popen, PIPE, STDOUT
|
||||
from collections import defaultdict
|
||||
#from collections import defaultdict
|
||||
|
||||
import buffer, bufferlist, color, completer, keyinput, method, minibuffer, mode
|
||||
import util, window
|
||||
|
@ -43,7 +43,8 @@ class Application(object):
|
|||
|
||||
# initialize some basic stuff
|
||||
# a highlighted_range contains three things: (window, start_p, end_p)
|
||||
self.state = defaultdict(lambda: {})
|
||||
#self.state = defaultdict(lambda: {})
|
||||
self.state = {}
|
||||
self.config = {}
|
||||
self.highlighted_ranges = []
|
||||
self.mini_active = False
|
||||
|
|
|
@ -6,9 +6,11 @@ class Context(object):
|
|||
self.namelines = None
|
||||
|
||||
def region_added(self, p, newlines):
|
||||
if self.names:
|
||||
self.adjust_name_map(p, len(newlines) - 1)
|
||||
self.rebuild_name_map(p.y, p.y + len(newlines))
|
||||
def region_removed(self, p1, p2):
|
||||
if self.names:
|
||||
self.adjust_name_map(p2, p1.y - p2.y)
|
||||
self.rebuild_name_map(p1.y, p1.y + 1)
|
||||
|
||||
|
|
|
@ -541,7 +541,7 @@ class PerlContext(context.Context):
|
|||
if t.name in m.opentokens and t.string in m.opentags:
|
||||
stack.append(t.string)
|
||||
elif t.name in m.closetokens and t.string in m.closetags:
|
||||
if stack[-1] == m.closetags[t.string]:
|
||||
if stack and stack[-1] == m.closetags[t.string]:
|
||||
stack.pop(-1)
|
||||
if t.string == '}' and not stack:
|
||||
curr = None
|
||||
|
@ -703,6 +703,7 @@ class Perl(mode.Fundamental):
|
|||
|
||||
def get_inc(self):
|
||||
a = self.window.application
|
||||
a.state.setdefault('perl', {})
|
||||
if 'inc' not in a.state['perl']:
|
||||
perllib = a.config.get('perl.lib')
|
||||
if perllib:
|
||||
|
|
Loading…
Reference in New Issue