diff options
author | Florent Le Coz <louiz@louiz.org> | 2011-01-12 07:18:17 +0100 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2011-01-12 07:18:17 +0100 |
commit | 1a448192696539eff781f234e1e633056a27a75b (patch) | |
tree | 9b3cece6fd5e76542067a64fb8bfd7142d0a2007 | |
parent | fce9a60f9a4b7ff7273e3351336ef5e268178ff3 (diff) | |
download | poezio-1a448192696539eff781f234e1e633056a27a75b.tar.gz poezio-1a448192696539eff781f234e1e633056a27a75b.tar.bz2 poezio-1a448192696539eff781f234e1e633056a27a75b.tar.xz poezio-1a448192696539eff781f234e1e633056a27a75b.zip |
Also, fix C-w
-rw-r--r-- | src/windows.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/windows.py b/src/windows.py index d2080b0b..e1b9db2f 100644 --- a/src/windows.py +++ b/src/windows.py @@ -741,13 +741,12 @@ class Input(Win): """ if not len(self.text) or self.pos == 0: return - previous_space = self.text[:self.pos+self.line_pos].rfind(' ') - if previous_space == -1: - previous_space = 0 - diff = self.pos+self.line_pos-previous_space - for i in range(diff): - self.key_backspace(False) - self.rewrite_text() + separators = string.punctuation+' ' + while self.pos > 0 and self.text[self.pos+self.line_pos-1] in separators: + self.key_backspace() + while self.pos > 0 and self.text[self.pos+self.line_pos-1] not in separators: + self.key_backspace() + return True def delete_end_of_line(self): |