From: Arun Prakash Jana <engineerarun@gmail.com>
Date: Wed, 9 Jan 2019 20:58:30 +0000 (+0530)
Subject: Remove redundant func call
X-Git-Tag: v2.3~145
X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=6c141d1bb49357304449d23599ef65664c94b5b9;p=nnn.git

Remove redundant func call
---

diff --git a/src/nnn.c b/src/nnn.c
index a55f666b..2e5f8a09 100644
--- 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;