diff options
| author | 2017-05-13 10:27:49 +0530 | |
|---|---|---|
| committer | 2017-05-13 10:27:49 +0530 | |
| commit | cbbe03247e70785404da4c9b70bf6fbaf61385a7 (patch) | |
| tree | 9b422d81224a40704798cbaf6bcc0abfbb7d2e63 | |
| parent | 549fa4ba052575e254bd870d5f332dd6ffc9a88a (diff) | |
| download | nnn-cbbe03247e70785404da4c9b70bf6fbaf61385a7.tar.gz | |
Fix #23
| -rw-r--r-- | nnn.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1592,13 +1592,13 @@ nochange: /* If nlay doesn't handle it, open plain text files with vi, then try NNN_FALLBACK_OPENER */ - strcpy(cmd, "file -b \""); + strcpy(cmd, "file -bi \""); xstrlcpy(cmd + strlen(cmd), newpath, strlen(newpath) + 1); strcat(cmd, "\""); if (get_output(cmd, MAX_CMD_LEN) == NULL) continue; - if (strstr(cmd, "ASCII text") != NULL) { + if (strstr(cmd, "text/") == cmd) { exitcurses(); run = xgetenv("EDITOR", "vi"); spawn(run, newpath, NULL, 0); |