about summary refs log tree commit diff stats
path: root/src/lua.c
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-11-13 15:11:03 -0800
committerKartik K. Agaram <vc@akkartik.com>2021-11-13 15:11:03 -0800
commitee0e7c36f588b9a80284b305fe4ba4bd549ce390 (patch)
treee082daec299beb1abe2ea802768c7f19a1f10cd6 /src/lua.c
parent4e62aa95b036a579e60f66f818daf5795a3201bb (diff)
downloadteliva-ee0e7c36f588b9a80284b305fe4ba4bd549ce390.tar.gz
.
Diffstat (limited to 'src/lua.c')
-rw-r--r--src/lua.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lua.c b/src/lua.c
index 0122eac..42fd1ec 100644
--- a/src/lua.c
+++ b/src/lua.c
@@ -365,7 +365,10 @@ static void save_image (lua_State *L) {
 /* death and rebirth */
 char *Script_name = NULL;
 char **Argv = NULL;
-extern void edit(lua_State *L, char *filename, const char *status);
+extern void edit(lua_State *L, char *filename, const char *message);
+void editBuffer(lua_State* L, const char* message) {
+  edit(L, "teliva_editbuffer", message);
+}
 
 
 void load_editor_buffer_to_current_definition_in_image(lua_State *L) {
@@ -384,7 +387,7 @@ void switch_to_editor (lua_State *L, const char *message) {
     edit(L, Script_name, message);
   else {
     save_to_current_definition_and_editor_buffer(L, "main");
-    edit(L, "teliva_editbuffer", /*status message*/ "");
+    editBuffer(L, /*status message*/ "");
     load_editor_buffer_to_current_definition_in_image(L);
   }
   execv(Argv[0], Argv);