Skip to content

Commit

Permalink
fix edge of line editor
Browse files Browse the repository at this point in the history
  • Loading branch information
haliphax committed Feb 7, 2021
1 parent c38400c commit e53dd26
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion xthulu/ui/editors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit e53dd26

Please sign in to comment.