Make undo behave more like in vim (but not quite there yet).