mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-09 15:08:13 +02:00
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.
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user