more consistent kill stuff

--HG--
branch : pmacs2
This commit is contained in:
moculus 2008-11-08 15:40:21 +00:00
parent ad71553553
commit e66d1592ba
1 changed files with 8 additions and 8 deletions

View File

@ -279,11 +279,11 @@ class DeleteRight(Method):
class DeleteLeftWord(Method): class DeleteLeftWord(Method):
'''Delete the from the cursor left to the end of the word''' '''Delete the from the cursor left to the end of the word'''
def _execute(self, w, **vargs): def _execute(self, w, **vargs):
w.kill_left_word() w.delete_left_word()
class DeleteRightWord(Method): class DeleteRightWord(Method):
'''Delete the from under cursor right to the end of the word''' '''Delete the from under cursor right to the end of the word'''
def _execute(self, w, **vargs): def _execute(self, w, **vargs):
w.kill_right_word() w.delete_right_word()
class DeleteLeftWhitespace(Method): class DeleteLeftWhitespace(Method):
'''Delete all contiguous of whitespace left of the cursor''' '''Delete all contiguous of whitespace left of the cursor'''
def _execute(self, w, **vargs): def _execute(self, w, **vargs):
@ -296,7 +296,7 @@ class DeleteLeftWhitespace(Method):
p = l p = l
l = w.point_left(p) l = w.point_left(p)
if p < c: if p < c:
w.kill(p, c) w.delete(p, c)
class DeleteRightWhitespace(Method): class DeleteRightWhitespace(Method):
'''Delete all contiguous of whitespace under and right of the cursor''' '''Delete all contiguous of whitespace under and right of the cursor'''
def _execute(self, w, **vargs): def _execute(self, w, **vargs):
@ -308,7 +308,7 @@ class DeleteRightWhitespace(Method):
break break
p = r p = r
if p > c: if p > c:
w.kill(c, p) w.delete(c, p)
class DeleteLeftSpace(Method): class DeleteLeftSpace(Method):
'''Delete all contiguous spaces left of the cursor''' '''Delete all contiguous spaces left of the cursor'''
def _execute(self, w, **vargs): def _execute(self, w, **vargs):
@ -321,7 +321,7 @@ class DeleteLeftSpace(Method):
p = l p = l
l = w.point_left(p) l = w.point_left(p)
if p < c: if p < c:
w.kill(p, c) w.delete(p, c)
class DeleteRightSpace(Method): class DeleteRightSpace(Method):
'''Delete all contiguous spaces under and right of the cursor''' '''Delete all contiguous spaces under and right of the cursor'''
def _execute(self, w, **vargs): def _execute(self, w, **vargs):
@ -333,7 +333,7 @@ class DeleteRightSpace(Method):
break break
p = r p = r
if p > c: if p > c:
w.kill(c, p) w.delete(c, p)
class MetaX(Method): class MetaX(Method):
'''Invoke commands by name''' '''Invoke commands by name'''
@ -463,7 +463,7 @@ class KillWhitespace(Method):
cursor = w.logical_cursor() cursor = w.logical_cursor()
i = w.buffer.count_leading_whitespace(cursor.y) i = w.buffer.count_leading_whitespace(cursor.y)
if i > 0: if i > 0:
w.kill(Point(0, cursor.y), Point(i, cursor.y)) w.delete(Point(0, cursor.y), Point(i, cursor.y))
# tabification # tabification
class TabBuffer(Method): class TabBuffer(Method):
@ -667,7 +667,7 @@ class WrapParagraph(Method):
k += 1 k += 1
# kill the old paragraph region, insert the new, and goto the new cursor # kill the old paragraph region, insert the new, and goto the new cursor
w.kill(p1, Point(len(w.buffer.lines[i-1]), i-1)) w.delete(p1, Point(len(w.buffer.lines[i-1]), i-1))
w.insert_lines(p1, newlines) w.insert_lines(p1, newlines)
w.goto(Point(x, y)) w.goto(Point(x, y))