bugfix: don't advance cursorx on newlines: start from cursorx = 0 after a newline.