This is still in progress. You can't *redo* snippet expansion and restore tab stops. Also, this commit performs all changes associated with snippet expansion in a transaction.
Buffer
UndoManager
UndoManager.prototype.transact