diff options
author | mathieui <mathieui@mathieui.net> | 2021-04-16 20:49:28 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2021-04-16 21:52:28 +0200 |
commit | e9f6cae5b5d836ff4ccff30d5034d2bf2c0f1271 (patch) | |
tree | 34bded765799cc23c97661eeae6da49e3fb672d4 | |
parent | 35519e6478eb42965fc9a856b3775dabda5dc730 (diff) | |
download | poezio-e9f6cae5b5d836ff4ccff30d5034d2bf2c0f1271.tar.gz poezio-e9f6cae5b5d836ff4ccff30d5034d2bf2c0f1271.tar.bz2 poezio-e9f6cae5b5d836ff4ccff30d5034d2bf2c0f1271.tar.xz poezio-e9f6cae5b5d836ff4ccff30d5034d2bf2c0f1271.zip |
fix: take newlines into account in input manipulation
fix #3411
-rw-r--r-- | poezio/windows/inputs.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/poezio/windows/inputs.py b/poezio/windows/inputs.py index 16c5c633..0d884464 100644 --- a/poezio/windows/inputs.py +++ b/poezio/windows/inputs.py @@ -110,7 +110,7 @@ class Input(Win): """ if self.pos == 0: return True - separators = string.punctuation + ' ' + separators = string.punctuation + ' ' + '\n' while self.pos > 0 and self.text[self.pos - 1] in separators: self.key_left() while self.pos > 0 and self.text[self.pos - 1] not in separators: @@ -123,7 +123,7 @@ class Input(Win): """ if self.is_cursor_at_end(): return True - separators = string.punctuation + ' ' + separators = string.punctuation + ' ' + '\n' while not self.is_cursor_at_end() and self.text[self.pos] in separators: self.key_right() while not self.is_cursor_at_end() and self.text[self. @@ -135,7 +135,7 @@ class Input(Win): """ Delete the word just before the cursor """ - separators = string.punctuation + ' ' + separators = string.punctuation + ' ' + '\n' while self.pos > 0 and self.text[self.pos - 1] in separators: self.key_backspace() while self.pos > 0 and self.text[self.pos - 1] not in separators: @@ -146,7 +146,7 @@ class Input(Win): """ Delete the word just after the cursor """ - separators = string.punctuation + ' ' + separators = string.punctuation + ' ' + '\n' while not self.is_cursor_at_end() and self.text[self.pos] in separators: self.key_dc() while not self.is_cursor_at_end() and self.text[self. |