Finished with Text Editor(fixed error with undo)