From 4310cd14f17310c85acecdb38e1b59ea9e661a15 Mon Sep 17 00:00:00 2001 From: mehbark Date: Thu, 1 May 2025 16:19:21 -0400 Subject: [PATCH] fix redo --- main.gd | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.gd b/main.gd index 9eacae2..5c804f3 100644 --- a/main.gd +++ b/main.gd @@ -31,10 +31,12 @@ func _input(event: InputEvent) -> void: step(Vector2i.LEFT) elif event.is_action_pressed("r"): step(Vector2i.RIGHT) - elif event.is_action_pressed("undo"): - hist.undo() + # because most redo keybinds are a superset of undo, we check them first + # e.g. if C-Z, then C-z is pressed elif event.is_action_pressed("redo"): hist.redo() + elif event.is_action_pressed("undo"): + hist.undo() elif event.is_action_pressed("restart"): restart()