]> Sergey Matveev's repositories - nnn.git/commitdiff
Remove redundant func call
authorArun Prakash Jana <engineerarun@gmail.com>
Wed, 9 Jan 2019 20:58:30 +0000 (02:28 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Thu, 10 Jan 2019 02:41:23 +0000 (08:11 +0530)
src/nnn.c

index a55f666b50db297b38cdf3e4df9454f388864bcd..2e5f8a09b194ce1caa83cdaeb954cfb25b75743d 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -2763,7 +2763,8 @@ nochange:
                                /* If NNN_USE_EDITOR is set, open text in EDITOR */
                                if (cfg.useeditor &&
                                    get_output(g_buf, CMD_LEN_MAX, "file", FILE_OPTS, newpath, FALSE) &&
-                                   strstr(g_buf, "text/") == g_buf) {
+                                   g_buf[0] == 't' && g_buf[1] == 'e' && g_buf[2] == 'x' &&
+                                   g_buf[3] == g_buf[0] && g_buf[4] == '/') {
                                        if (!quote_run_sh_cmd(editor, newpath, path))
                                                goto nochange;
                                        continue;