diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-11-26 19:38:51 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-11-26 19:38:51 -0800 |
commit | 3cb37a0f3948670cfd833a5cad5a32019dfdb097 (patch) | |
tree | c678a00d009fb2acab19450a924fe04a7ad9c8ec /src | |
parent | a0171352a11dc250d62f86872d8574b0a36ec888 (diff) | |
download | teliva-3cb37a0f3948670cfd833a5cad5a32019dfdb097.tar.gz |
render undo events
Diffstat (limited to 'src')
-rw-r--r-- | src/lua.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lua.c b/src/lua.c index 2fcf7e3..7662a55 100644 --- a/src/lua.c +++ b/src/lua.c @@ -556,6 +556,14 @@ void render_recent_changes (lua_State *L, int history_array, int start_index, in lua_rawgeti(L, history_array, i); int t = lua_gettop(L); for (lua_pushnil(L); lua_next(L, t) != 0; lua_pop(L, 1)) { + if (strcmp(lua_tostring(L, -2), "__teliva_undo") == 0) { + addstr("undo to "); + attron(A_BOLD); + printw("%d", lua_tointeger(L, -1)); + attroff(A_BOLD); + y++; + continue; + } const char *definition_name = lua_tostring(L, -2); if (is_special_history_key(definition_name)) continue; addstr(definition_name); |