Merging patch from Vivian De Smedt for tab insert, removed comments with vds initials

This commit is contained in:
Jorgen Stenarson
2008-08-25 19:12:51 +02:00
4 changed files with 9 additions and 2 deletions
+4
View File
@@ -1,3 +1,7 @@
2008-08-25 Jörgen Stenarson <jorgen.stenarson -at- bostream.nu>
* Merging tab insert patch from Vivian De Smedt. Removed comments
with vds initials.
2008-02-21 Jörgen Stenarson <jorgen.stenarson -at- bostream.nu>
* unicodehelper functions now defaults to ascii if supplied pyreadline_encoding is
not a valid encoding. This is a brute force solution to ticket #228 it fixes
+1
View File
@@ -25,6 +25,7 @@ class BaseMode(object):
self.key_dispatch = {}
self.argument=1
self.prevargument=None
self.tabstop = 4
def __repr__(self):
return "<BaseMode>"
+2 -1
View File
@@ -283,7 +283,8 @@ class EmacsMode(basemode.BaseMode):
def tab_insert(self, e): # (M-TAB)
'''Insert a tab character. '''
ws = ' ' * (self.tabstop - (self.line_cursor%self.tabstop))
cursor = min(self.l_buffer.point, len(self.l_buffer.line_buffer))
ws = ' ' * (self.tabstop - (cursor % self.tabstop))
self.insert_text(ws)
def transpose_chars(self, e): # (C-t)
+2 -1
View File
@@ -272,7 +272,8 @@ class NotEmacsMode(basemode.BaseMode):
def tab_insert(self, e): # (M-TAB)
'''Insert a tab character. '''
ws = ' ' * (self.tabstop - (self.line_cursor%self.tabstop))
cursor = min(self.l_buffer.point, len(self.l_buffer.line_buffer))
ws = ' ' * (self.tabstop - (cursor % self.tabstop))
self.insert_text(ws)
def self_insert(self, e): # (a, b, A, 1, !, ...)