From 6a3eb3f3d7e06a50a5e7cd0764551dc4791dba66 Mon Sep 17 00:00:00 2001 From: Trygve Aaberge Date: Sun, 23 Feb 2020 11:48:49 +0100 Subject: [PATCH] tui line_edit: Set correct cursor position on end Previously, the cursor would end up one character after the last typed character when pressing end in the unicode input kitten. --- kittens/tui/line_edit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kittens/tui/line_edit.py b/kittens/tui/line_edit.py index 085d72bc2..355570f67 100644 --- a/kittens/tui/line_edit.py +++ b/kittens/tui/line_edit.py @@ -103,7 +103,7 @@ class LineEdit: def end(self): orig = self.cursor_pos - self.cursor_pos = wcswidth(self.current_input) + 1 + self.cursor_pos = wcswidth(self.current_input) return self.cursor_pos != orig def on_key(self, key_event):