]> Sergey Matveev's repositories - nnn.git/commitdiff
Fix #147: arg should be at the end as it can be NULL
authorArun Prakash Jana <engineerarun@gmail.com>
Tue, 27 Nov 2018 23:44:00 +0000 (05:14 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Tue, 27 Nov 2018 23:44:12 +0000 (05:14 +0530)
src/nnn.c

index 7d37716ab6aaa3e0e3b73872529817d49a3d2ce0..7a0ac90505ed486ddb3a9bedc1d339e0f6d74324 100644 (file)
--- 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;
                                        }
                                }