parent
b61d3d3eb9
commit
214ee106aa
10
mode.py
10
mode.py
|
@ -140,15 +140,15 @@ class Fundamental(Handler):
|
||||||
self.add_bindings('cmd-help-buffer', ('M-h',))
|
self.add_bindings('cmd-help-buffer', ('M-h',))
|
||||||
self.add_bindings('set-mode', ('C-x m',))
|
self.add_bindings('set-mode', ('C-x m',))
|
||||||
self.add_bindings('cancel', ('C-]',))
|
self.add_bindings('cancel', ('C-]',))
|
||||||
#self.add_bindings('close-paren', (')',))
|
self.add_bindings('close-paren', (')',))
|
||||||
#self.add_bindings('close-brace', ('}',))
|
self.add_bindings('close-brace', ('}',))
|
||||||
#self.add_bindings('close-bracket', (']',))
|
self.add_bindings('close-bracket', (']',))
|
||||||
|
|
||||||
# create all the insert actions for the character ranges we like
|
# create all the insert actions for the character ranges we like
|
||||||
for c in string.letters + string.digits + string.punctuation:
|
for c in string.letters + string.digits + string.punctuation:
|
||||||
## closing tags are handled differently
|
## closing tags are handled differently
|
||||||
#if c == ')' or c == ']' or c == '}':
|
if c == ')' or c == ']' or c == '}':
|
||||||
# continue
|
continue
|
||||||
self.add_binding('insert-string-%s' % c, c)
|
self.add_binding('insert-string-%s' % c, c)
|
||||||
|
|
||||||
# initialize some stuff
|
# initialize some stuff
|
||||||
|
|
|
@ -9,8 +9,8 @@ class Python(mode2.Fundamental):
|
||||||
def __init__(self, w):
|
def __init__(self, w):
|
||||||
mode2.Fundamental.__init__(self, w)
|
mode2.Fundamental.__init__(self, w)
|
||||||
|
|
||||||
#self.tag_matching = True
|
self.tag_matching = True
|
||||||
self.tag_matching = False
|
#self.tag_matching = False
|
||||||
self.grammar = lex2_python.PythonGrammar()
|
self.grammar = lex2_python.PythonGrammar()
|
||||||
self.lexer = lex2.Lexer(self.name(), self.grammar)
|
self.lexer = lex2.Lexer(self.name(), self.grammar)
|
||||||
|
|
||||||
|
@ -19,9 +19,9 @@ class Python(mode2.Fundamental):
|
||||||
self.add_action_and_bindings(PythonUpdateTags(), ('C-c t',))
|
self.add_action_and_bindings(PythonUpdateTags(), ('C-c t',))
|
||||||
self.add_action_and_bindings(PythonTagComplete(), ('C-c k',))
|
self.add_action_and_bindings(PythonTagComplete(), ('C-c k',))
|
||||||
|
|
||||||
#self.add_bindings('close-paren', (')',))
|
self.add_bindings('close-paren', (')',))
|
||||||
#self.add_bindings('close-brace', ('}',))
|
self.add_bindings('close-brace', ('}',))
|
||||||
#self.add_bindings('close-bracket', (']',))
|
self.add_bindings('close-bracket', (']',))
|
||||||
|
|
||||||
self.default_color = color.build('default', 'default')
|
self.default_color = color.build('default', 'default')
|
||||||
|
|
||||||
|
|
|
@ -190,7 +190,7 @@ class Window(object):
|
||||||
(x, y) = (0, 0)
|
(x, y) = (0, 0)
|
||||||
break
|
break
|
||||||
counter += 1
|
counter += 1
|
||||||
self.first = Point(0, y)
|
self.first = Point(x - (x % self.width), y)
|
||||||
self.redraw()
|
self.redraw()
|
||||||
def assure_visible_cursor(self):
|
def assure_visible_cursor(self):
|
||||||
if not self.cursor_is_visible():
|
if not self.cursor_is_visible():
|
||||||
|
|
Loading…
Reference in New Issue