From db7202ccfd30857d18c48a2dcf37b0a2ae95807a Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 26 Nov 2021 21:20:23 -0800 Subject: . --- src/lua.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/lua.c b/src/lua.c index 04cbbaa..b0662f7 100644 --- a/src/lua.c +++ b/src/lua.c @@ -625,13 +625,10 @@ void add_undo_event(lua_State *L, int cursor) { lua_rawseti(L, history_array, history_array_size); /* clean up */ lua_pop(L, 1); - /* persist */ - save_image(L); } // TODO: -// jump to current change // add a note void recent_changes (lua_State *L) { lua_getglobal(L, "teliva_program"); @@ -660,8 +657,10 @@ void recent_changes (lua_State *L) { if (cursor < history_array_size) ++cursor; break; case CTRL_U: - if (cursor < history_array_size) + if (cursor < history_array_size) { add_undo_event(L, cursor); + save_image(L); + } break; } lua_pop(L, 1); -- cgit 1.4.1-2-gfad0