diff options
Diffstat (limited to 'src/lua.c')
-rw-r--r-- | src/lua.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lua.c b/src/lua.c index 102d1a1..22206f1 100644 --- a/src/lua.c +++ b/src/lua.c @@ -927,7 +927,7 @@ int editor_view_in_progress (lua_State *L) { } extern int edit_from(lua_State* L, char* filename, const char* message, int rowoff, int coloff, int cy, int cx); -int editor_view (lua_State *L) { +int restore_editor_view (lua_State *L) { lua_getglobal(L, "__teliva_editor_state"); int editor_state_index = lua_gettop(L); lua_getfield(L, editor_state_index, "definition"); @@ -941,8 +941,8 @@ int editor_view (lua_State *L) { int cy = lua_tointeger(L, -1); lua_getfield(L, editor_state_index, "cx"); int cx = lua_tointeger(L, -1); - int back_to_big_picture = edit_from(L, "teliva_editor_buffer", /*error message*/ "", rowoff, coloff, cy, cx); lua_settop(L, editor_state_index); + int back_to_big_picture = edit_from(L, "teliva_editor_buffer", /*error message*/ "", rowoff, coloff, cy, cx); // TODO: error handling like in edit_current_definition return back_to_big_picture; } @@ -959,7 +959,7 @@ void developer_mode (lua_State *L) { nodelay(stdscr, 0); /* make getch() block */ int switch_to_big_picture_view = 1; if (editor_view_in_progress(L)) - switch_to_big_picture_view = editor_view(L); + switch_to_big_picture_view = restore_editor_view(L); if (switch_to_big_picture_view) big_picture_view(L); cleanup_curses(); |