diff --git a/xthulu/ui/editors.py b/xthulu/ui/editors.py index bf40529..2b9d5f7 100644 --- a/xthulu/ui/editors.py +++ b/xthulu/ui/editors.py @@ -183,8 +183,10 @@ def process_keystroke(self, ks): self.value[self.pos[0]] = before + ucs + after self.pos[1] += 1 + move_left = len(after) if self.pos[1] < len(self.value[self.pos[0]]) \ + else len(after) - 1 - return self._color(ucs + after + self.term.move_left(len(after))) + return self._color(ucs + after + self.term.move_left(move_left)) class LineEditor(BlockEditor):