Further polish on undoing/redo'ing so that it works with current text in addition to manually saved text