From e08f3c306dc6aa61a91fc06e3f999bbd6d9d520b Mon Sep 17 00:00:00 2001 From: visionmercer <62051836+visionmercer@users.noreply.github.com> Date: Wed, 27 May 2026 13:48:34 +0200 Subject: [PATCH] rudimentary undo functionality --- pixler.bas | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pixler.bas b/pixler.bas index 682e495..1426a1a 100644 --- a/pixler.bas +++ b/pixler.bas @@ -140,6 +140,16 @@ do showcolorpicker=not showcolorpicker case "l" showcommands=not showcommands + case chr$(26) ' Ctrl+Z + if ubound(commands) > 3 then + ' Drop the trailing empty slot AND the last valid command + redim _preserve commands(ubound(commands) - 2) as string + + ' Re-create the empty trailing slot required by addcommand + redim _preserve commands(ubound(commands) + 1) as string + + redraw + end if end select ' 4. Draw everything using the freshly updated math