diff options
Diffstat (limited to 'editor.c')
-rw-r--r-- | editor.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -55,7 +55,6 @@ static int launch_specified_editor(const char *editor, const char *path, if (strcmp(editor, ":")) { struct strbuf realpath = STRBUF_INIT; - const char *args[] = { editor, NULL, NULL }; struct child_process p = CHILD_PROCESS_INIT; int ret, sig; int print_waiting_for_editor = advice_enabled(ADVICE_WAITING_FOR_EDITOR) && isatty(2); @@ -77,9 +76,8 @@ static int launch_specified_editor(const char *editor, const char *path, } strbuf_realpath(&realpath, path, 1); - args[1] = realpath.buf; - p.argv = args; + strvec_pushl(&p.args, editor, realpath.buf, NULL); p.env = env; p.use_shell = 1; p.trace2_child_class = "editor"; |