aboutsummaryrefslogtreecommitdiff
path: root/src/user.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/user.c')
-rw-r--r--src/user.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/user.c b/src/user.c
index 0261c65..927e852 100644
--- a/src/user.c
+++ b/src/user.c
@@ -12,6 +12,7 @@
#include "cdraw.h"
#include "types.h"
#include "tools.h"
+#include "action.h"
#include "canvas.h"
#include "palette.h"
@@ -242,3 +243,19 @@ choose_file_path(const char *prompt, char *input)
if (ft != stdin) pclose(ft);
}
+
+void
+user_canvas_undo(const Arg *x)
+{
+ if (cur_canvas == NULL) return;
+ action_undo(cur_canvas);
+ ui_redraw_panel(UI_PANELTYPE_CANVAS);
+}
+
+void
+user_canvas_redo(const Arg *x)
+{
+ if (cur_canvas == NULL) return;
+ action_redo(cur_canvas);
+ ui_redraw_panel(UI_PANELTYPE_CANVAS);
+}