Fix #36: Cursor jumps to end of line while editing