very rudimentary todo state cycling
keep cursor position intact after replacing a line