From e782cb1ead627ab7b58046566de50b972352dc9a Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 27 Jan 2022 00:40:33 -0800 Subject: [PATCH] bugfix: editor was no longer saving anything I made the changes reverted here out of a mistaken sense that big-picture edits would interfere with Teliva's memory of what is currently being edited (teliva_editor_state). --- src/teliva.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/teliva.c b/src/teliva.c index 402e60e..f3e6ceb 100644 --- a/src/teliva.c +++ b/src/teliva.c @@ -630,10 +630,8 @@ void big_picture_view(lua_State* L) { lua_settop(L, oldtop); default_big_picture_view(L); } else { - FILE* out = fopen("teliva_big_picture", "w"); - fprintf(out, "%s", lua_tostring(L, -1)); - fclose(out); - int back_to_big_picture = edit(L, "teliva_big_picture", "doc:main"); + save_to_current_definition_and_editor_buffer(L, "doc:main"); + int back_to_big_picture = edit_current_definition(L); if (back_to_big_picture) default_big_picture_view(L); }