diff options
Diffstat (limited to 'src/lcurseslib.c')
-rw-r--r-- | src/lcurseslib.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/lcurseslib.c b/src/lcurseslib.c index a6eeaa1..5a5b8b0 100644 --- a/src/lcurseslib.c +++ b/src/lcurseslib.c @@ -112,21 +112,15 @@ static int Pcolor_pair (lua_State *L) } -extern char **Argv; -extern char *Script_name; -extern void edit(char *filename, const char *message); +extern void switch_to_editor(const char *message); static int Pgetch (lua_State *L) { int c = wgetch(stdscr); if (c == ERR) return 0; if (c == 24) /* ctrl-x */ exit(0); - if (c == 5) { /* ctrl-e */ - /* death and rebirth */ - endwin(); - edit(Script_name, ""); - execv(Argv[0], Argv); - } + if (c == 5) /* ctrl-e */ + switch_to_editor(""); /* handle other standard menu hotkeys here */ lua_pushinteger(L, c); return 1; |