Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undo not working while playing #76

Open
ghost opened this issue May 11, 2021 · 0 comments
Open

Undo not working while playing #76

ghost opened this issue May 11, 2021 · 0 comments

Comments

@ghost
Copy link

ghost commented May 11, 2021

I was not able to undo. I looked at the code and changed this:

diff --git a/tui_main.c b/tui_main.c
index d525d05..e671915 100644
--- a/tui_main.c
+++ b/tui_main.c
@@ -1854,10 +1854,7 @@ staticni void ged_input_cmd(Ged *a, Ged_input_cmd ev) {
   case Ged_input_cmd_undo:
     if (undo_history_count(&a->undo_hist) == 0)
       break;
-    if (a->is_playing)
-      undo_history_apply(&a->undo_hist, &a->field, &a->tick_num);
-    else
-      undo_history_pop(&a->undo_hist, &a->field, &a->tick_num);
+    undo_history_pop(&a->undo_hist, &a->field, &a->tick_num);
     ged_cursor_confine(&a->ged_cursor, a->field.height, a->field.width);
     ged_update_internal_geometry(a);
     ged_make_cursor_visible(a);

I am very confused why does undo restore the tick? And why is it disabled while playing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants