http://blog.chukong-inc.com/index.php/2012/06/26/redo-undo-%E7%9A%84%E4%B8%89%E7%A7%8D%E5%AE%9E%E7%8E%B0/