return error("Terminal is dumb, but EDITOR unset");
if (strcmp(editor, ":")) {
- const char *args[] = { editor, path, NULL };
+ const char *args[] = { editor, real_path(path), NULL };
struct child_process p;
- int ret;
+ int ret, sig;
memset(&p, 0, sizeof(p));
p.argv = args;
sigchain_push(SIGINT, SIG_IGN);
sigchain_push(SIGQUIT, SIG_IGN);
ret = finish_command(&p);
+ sig = ret - 128;
sigchain_pop(SIGINT);
sigchain_pop(SIGQUIT);
+ if (sig == SIGINT || sig == SIGQUIT)
+ raise(sig);
if (ret)
return error("There was a problem with the editor '%s'.",
editor);