Also, fix C-w
This commit is contained in:
parent
fce9a60f9a
commit
1a44819269
1 changed files with 6 additions and 7 deletions
|
@ -741,13 +741,12 @@ class Input(Win):
|
||||||
"""
|
"""
|
||||||
if not len(self.text) or self.pos == 0:
|
if not len(self.text) or self.pos == 0:
|
||||||
return
|
return
|
||||||
previous_space = self.text[:self.pos+self.line_pos].rfind(' ')
|
separators = string.punctuation+' '
|
||||||
if previous_space == -1:
|
while self.pos > 0 and self.text[self.pos+self.line_pos-1] in separators:
|
||||||
previous_space = 0
|
self.key_backspace()
|
||||||
diff = self.pos+self.line_pos-previous_space
|
while self.pos > 0 and self.text[self.pos+self.line_pos-1] not in separators:
|
||||||
for i in range(diff):
|
self.key_backspace()
|
||||||
self.key_backspace(False)
|
|
||||||
self.rewrite_text()
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def delete_end_of_line(self):
|
def delete_end_of_line(self):
|
||||||
|
|
Loading…
Reference in a new issue