diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-11-26 21:20:23 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-11-26 21:20:23 -0800 |
commit | db7202ccfd30857d18c48a2dcf37b0a2ae95807a (patch) | |
tree | d02f7a2407f20b5897495a72b15bce1ca56a0f77 /src | |
parent | 35fe28a36f9355649f96fcd2cca28d92cebe3f65 (diff) | |
download | teliva-db7202ccfd30857d18c48a2dcf37b0a2ae95807a.tar.gz |
.
Diffstat (limited to 'src')
-rw-r--r-- | src/lua.c | 7 |
1 files changed, 3 insertions, 4 deletions
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); |