Browse Source

Fix #23

master
Arun Prakash Jana 8 years ago
parent
commit
cbbe03247e
No known key found for this signature in database GPG Key ID: A75979F35C080412
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      nnn.c

+ 2
- 2
nnn.c View File

@@ -1592,13 +1592,13 @@ nochange:


/* If nlay doesn't handle it, open plain text /* If nlay doesn't handle it, open plain text
files with vi, then try NNN_FALLBACK_OPENER */ files with vi, then try NNN_FALLBACK_OPENER */
strcpy(cmd, "file -b \""); strcpy(cmd, "file -bi \"");
xstrlcpy(cmd + strlen(cmd), newpath, strlen(newpath) + 1); xstrlcpy(cmd + strlen(cmd), newpath, strlen(newpath) + 1);
strcat(cmd, "\""); strcat(cmd, "\"");
if (get_output(cmd, MAX_CMD_LEN) == NULL) if (get_output(cmd, MAX_CMD_LEN) == NULL)
continue; continue;


if (strstr(cmd, "ASCII text") != NULL) { if (strstr(cmd, "text/") == cmd) {
exitcurses(); exitcurses();
run = xgetenv("EDITOR", "vi"); run = xgetenv("EDITOR", "vi");
spawn(run, newpath, NULL, 0); spawn(run, newpath, NULL, 0);


||||||
x
 
000:0
Loading…
Cancel
Save