From: Arun Prakash Jana Date: Tue, 27 Nov 2018 23:44:00 +0000 (+0530) Subject: Fix #147: arg should be at the end as it can be NULL X-Git-Tag: v2.2~107 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=8ac68fcc5be4089acfda4c2c476cef6542456e43;p=nnn.git Fix #147: arg should be at the end as it can be NULL --- diff --git a/src/nnn.c b/src/nnn.c index 7d37716a..7a0ac905 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -2641,7 +2641,7 @@ nochange: /* If NNN_USE_EDITOR is set, open text in EDITOR */ if (editor) { if (getmime(dents[cur].name)) { - spawn(editor, editor_arg, newpath, path, F_NORMAL); + spawn(editor, newpath, editor_arg, path, F_NORMAL); continue; } @@ -2652,7 +2652,7 @@ nochange: continue; if (strstr(g_buf, "text/") == g_buf) { - spawn(editor, editor_arg, newpath, path, F_NORMAL); + spawn(editor, newpath, editor_arg, path, F_NORMAL); continue; } }