ITextUndoHistory ITextUndoHistoryRegistry.RegisterHistory(object context) { ITextUndoHistory history; if (!_map.TryGetValue(context, out history)) { history = new BasicUndoHistory(context); foreach (var c in GetDependentContexts(context)) { // If this context already has an attached history, don't replace it. // This happens for ephemeral projection buffers for previews created // by the diff for a quick fix. _map.GetValue(c, _ => history); } } return history; }
internal BasicUndoTransaction(BasicUndoHistory textUndoHistory, string description) { _textUndoHistory = textUndoHistory; Description = description; }