rudimentary undo functionality

This commit is contained in:
visionmercer 2026-05-27 13:48:34 +02:00
commit e08f3c306d

View file

@ -140,6 +140,16 @@ do
showcolorpicker=not showcolorpicker showcolorpicker=not showcolorpicker
case "l" case "l"
showcommands=not showcommands 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 end select
' 4. Draw everything using the freshly updated math ' 4. Draw everything using the freshly updated math