Undo/redo is a complete reversal of previous state, right? That is, we should also wrap lines and stuff on undo/redo? I'll dry this code up later but it looks good, of course. How could it not look good? <3