# Sandbox.UI.TextEntry.Undo

```csharp
void Undo()
```

Put back the text, caret and selection from before the last edit.

Declared in [Sandbox.UI.TextEntry](/api/Sandbox.UI.TextEntry).
Assembly: `Sandbox.Engine`.
