summaryrefslogtreecommitdiff
path: root/src/windows/inputs.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/windows/inputs.py')
-rw-r--r--src/windows/inputs.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/windows/inputs.py b/src/windows/inputs.py
index d345443b..12d3a9a2 100644
--- a/src/windows/inputs.py
+++ b/src/windows/inputs.py
@@ -43,6 +43,8 @@ class Input(Win):
'^D': self.key_dc,
'M-b': self.jump_word_left,
"M-[1;5D": self.jump_word_left,
+ "kRIT5": self.jump_word_right,
+ "kLFT5": self.jump_word_left,
'^W': self.delete_word,
'M-d': self.delete_next_word,
'^K': self.delete_end_of_line,
@@ -534,6 +536,11 @@ class Input(Win):
if self.view_pos < 0:
self.view_pos = 0
+ # text small enough to fit inside the window entirely:
+ # remove scrolling if present
+ if poopt.wcswidth(self.text) < self.width:
+ self.view_pos = 0
+
assert(self.pos >= self.view_pos and
self.pos <= self.view_pos + max(self.width, 3))