Vixen
02b45cc4
csharp
public sealed class TextEditCommand

One run of typing, as an undo entry.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

The whole text, before and after. A structural edit — an insert with its position and length — is what a text editor's own undo stack holds, and it is the right shape when the stack belongs to the editor. This stack belongs to the document, alongside the command that renamed the asset and the one that changed its import settings, so an entry has to be replayable against a buffer that something else may have touched. A snapshot is; an offset is not.

The cost is the file's size per undo entry, which for source files is kilobytes. That is the trade this makes deliberately, and it is why TryMergeWith is where the entry count is actually controlled.

Fields and properties (2)

  • public string After

    The text this entry leaves behind.

  • public string Name

    What this is called in the undo history, as a person would say it.

Methods (4)

Used by (1)

  • CodeDocumentVixen.Editor.AssetEditors