diff options
author | Florent Le Coz <louiz@louiz.org> | 2011-02-15 20:33:00 +0100 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2011-02-15 20:33:00 +0100 |
commit | 3302c730af597aecee27e2bfb3a76b75884e919d (patch) | |
tree | 49992b7df7c4e788f7dee37dce481b5afa2771eb | |
parent | 36094c15cf49d0a210a817c6d2f729d99fdc9c3a (diff) | |
download | poezio-3302c730af597aecee27e2bfb3a76b75884e919d.tar.gz poezio-3302c730af597aecee27e2bfb3a76b75884e919d.tar.bz2 poezio-3302c730af597aecee27e2bfb3a76b75884e919d.tar.xz poezio-3302c730af597aecee27e2bfb3a76b75884e919d.zip |
Ctrl+left and right jump a word in the input
-rw-r--r-- | src/windows.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/windows.py b/src/windows.py index 8d2af94c..1a59f260 100644 --- a/src/windows.py +++ b/src/windows.py @@ -706,6 +706,7 @@ class Input(Win): "KEY_DC": self.key_dc, '^D': self.key_dc, 'M-b': self.jump_word_left, + "M-[1;5D": self.jump_word_left, '^W': self.delete_word, '^K': self.delete_end_of_line, '^U': self.delete_begining_of_line, @@ -713,6 +714,7 @@ class Input(Win): '^A': self.key_home, '^E': self.key_end, 'M-f': self.jump_word_right, + "M-[1;5C": self.jump_word_right, "KEY_BACKSPACE": self.key_backspace, '^?': self.key_backspace, } @@ -991,8 +993,8 @@ class Input(Win): if self.on_input: self.on_input(self.get_text()) return res - # if not key or len(key) > 1: - # return False # ignore non-handled keyboard shortcuts + if not key or len(key) > 1: + return False # ignore non-handled keyboard shortcuts self.reset_completion() self.text = self.text[:self.pos+self.line_pos]+key+self.text[self.pos+self.line_pos:] (y, x) = self._win.getyx() |