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).
This commit is contained in:
Kartik K. Agaram 2022-01-27 00:40:33 -08:00
parent ce186e85f4
commit e782cb1ead
1 changed files with 2 additions and 4 deletions

View File

@ -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);
}