I've submitted a new patch that does a partial overhaul of how operators on the the text editor's undo/redo buffer are stored and used. The patch is here: http://projects.blender.org/tracker/index.php?func=detail&aid=31006&group_id=9&atid=127 I've provided some more in-depth info in the description of the patch. Thanks!