about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-11-29 22:38:46 -0800
committerKartik K. Agaram <vc@akkartik.com>2021-11-29 22:38:46 -0800
commitb6bca6ac14bce04539d5499bdf500a3268fe4011 (patch)
tree478e280b7d0680395ca8b4c91f1966c7eeb03d03 /src
parentfa52f129fb5a0e352499b2ebba5eb89d9dd4227b (diff)
downloadteliva-b6bca6ac14bce04539d5499bdf500a3268fe4011.tar.gz
fix regression in showing error messages
Diffstat (limited to 'src')
-rw-r--r--src/lua.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lua.c b/src/lua.c
index d10c693..89cbc16 100644
--- a/src/lua.c
+++ b/src/lua.c
@@ -940,8 +940,8 @@ int editor_view_in_progress (lua_State *L) {
   return result;
 }
 
-extern int edit_from(lua_State* L, char* filename, const char* message, int rowoff, int coloff, int cy, int cx);
-int restore_editor_view (lua_State *L) {
+extern int edit_from(lua_State *L, char *filename, const char *message, int rowoff, int coloff, int cy, int cx);
+int restore_editor_view (lua_State *L, const char *status_message) {
   lua_getglobal(L, "__teliva_editor_state");
   int editor_state_index = lua_gettop(L);
   lua_getfield(L, editor_state_index, "definition");
@@ -956,7 +956,7 @@ int restore_editor_view (lua_State *L) {
   lua_getfield(L, editor_state_index, "cx");
   int cx = lua_tointeger(L, -1);
   lua_settop(L, editor_state_index);
-  int back_to_big_picture = edit_from(L, "teliva_editor_buffer", /*error message*/ "", rowoff, coloff, cy, cx);
+  int back_to_big_picture = edit_from(L, "teliva_editor_buffer", status_message, rowoff, coloff, cy, cx);
   // error handling
   while (1) {
     int status;
@@ -983,7 +983,7 @@ void developer_mode (lua_State *L, const char *status_message) {
   nodelay(stdscr, 0);  /* make getch() block */
   int switch_to_big_picture_view = 1;
   if (editor_view_in_progress(L))
-    switch_to_big_picture_view = restore_editor_view(L);
+    switch_to_big_picture_view = restore_editor_view(L, status_message);
   if (switch_to_big_picture_view)
     big_picture_view(L, status_message);
   cleanup_curses();