diff options
| author | historia <[not public]> | 2026-07-03 20:53:00 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-07-03 20:53:00 -0400 |
| commit | a5d4ead1795882d25da7eda53680d2a84590693d (patch) | |
| tree | 747a0516e03f22fdf511e55ee4c4809d4a1acd78 /internal/admin/undo.go | |
| parent | 0dfd7bf19e800b67e03726c18cfa00e623d6b121 (diff) | |
| download | thehouseoficarus-a5d4ead1795882d25da7eda53680d2a84590693d.tar.gz | |
feat: admin map can add new and rename areas. works with empty directories now.
Diffstat (limited to 'internal/admin/undo.go')
| -rw-r--r-- | internal/admin/undo.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/internal/admin/undo.go b/internal/admin/undo.go index fb91a15..f69fd9f 100644 --- a/internal/admin/undo.go +++ b/internal/admin/undo.go @@ -330,3 +330,12 @@ func (us *UndoStack) load() { us.history = fromEntries(saveData.History) log.Printf("undo: loaded %d history entries", len(us.history)) } + +func (us *UndoStack) Clear() { + us.mu.Lock() + defer us.mu.Unlock() + us.history = nil + us.redo = nil + os.Remove(us.filePath) + log.Printf("undo: cleared history") +} |
