parent
e4f2a4d05b
commit
87c846d3bd
|
@ -252,7 +252,7 @@ class DeleteLeft(Method):
|
|||
line = w.buffer.lines[y]
|
||||
tabwidth = w.mode.tabwidth
|
||||
if x >= tabwidth and x % tabwidth == 0 and line[0:x].isspace():
|
||||
w.kill(Point(x - tabwidth, y), Point(x, y))
|
||||
w.delete(Point(x - tabwidth, y), Point(x, y))
|
||||
else:
|
||||
w.left_delete()
|
||||
class DeleteRight(Method):
|
||||
|
@ -262,7 +262,7 @@ class DeleteRight(Method):
|
|||
line = w.buffer.lines[cursor.y]
|
||||
lvl = w.mode.tabwidth
|
||||
if len(line[cursor.x:]) >= lvl and line[:cursor.x + lvl].isspace():
|
||||
w.kill(Point(cursor.x, cursor.y), Point(cursor.x + lvl, cursor.y))
|
||||
w.delete(Point(cursor.x, cursor.y), Point(cursor.x + lvl, cursor.y))
|
||||
else:
|
||||
w.right_delete()
|
||||
class DeleteLeftWord(Method):
|
||||
|
|
|
@ -375,7 +375,7 @@ class PerlHashCleanup(Method):
|
|||
end_p = Point(0, end + 1)
|
||||
else:
|
||||
end_p = Point(len(w.buffer.lines[end]), end)
|
||||
w.kill(start_p, end_p)
|
||||
w.delete(start_p, end_p)
|
||||
w.insert_string(start_p, data)
|
||||
|
||||
class PerlWrapParagraph(method.WrapParagraph):
|
||||
|
|
|
@ -296,7 +296,7 @@ class PythonDictCleanup(method.Method):
|
|||
end_p = Point(0, end + 1)
|
||||
else:
|
||||
end_p = Point(len(w.buffer.lines[-1]), len(w.buffer.lines) - 1)
|
||||
w.kill(start_p, end_p)
|
||||
w.delete(start_p, end_p)
|
||||
w.insert_string(start_p, data)
|
||||
|
||||
class PythonInsertTripleSquotes(method.Method):
|
||||
|
|
|
@ -67,7 +67,7 @@ class SearchDeleteLeft(method.Method):
|
|||
_post_delete(w)
|
||||
class SearchDeleteLeftWord(method.Method):
|
||||
def execute(self, w, **vargs):
|
||||
w.kill_left_word()
|
||||
w.delete_left_word()
|
||||
_post_delete(w)
|
||||
def _post_delete(w):
|
||||
old_cursor = w.buffer.method.old_cursor
|
||||
|
|
Loading…
Reference in New Issue