README.md | 4 ++-- src/nnn.c | 10 +++++----- diff --git a/README.md b/README.md index b177b7092bb33e6a9b2457fe5cf9dcbc16a4ae5c..17d48fda550f3ff704594606bf3836d844f130e2 100644 --- a/README.md +++ b/README.md @@ -91,13 +91,13 @@ #### Utility dependencies | Dependency | Installation | Operation | | --- | --- | --- | -| xdg-open (Linux), open(1) (macOS), cygstart (Cygwin) | base | desktop opener | +| xdg-open (Linux), open(1) (macOS), cygstart
(Cygwin), open (Haiku) | base | desktop opener | | file, coreutils (cp, mv, rm), xargs | base | file type, copy, move and remove | | tar, (un)zip [atool/bsdtar for more formats] | base | create, list, extract bzip2, (g)zip, tar | | archivemount, fusermount(3) | optional | mount, unmount archives | | sshfs, [rclone](https://rclone.org/), fusermount(3) | optional | mount, unmount remotes | | trash-cli | optional | trash files (default action: rm) | -| vlock (Linux), bashlock (macOS), lock(1) (BSD) | optional | terminal locker (fallback: [cmatrix](https://github.com/abishekvashok/cmatrix)) | +| vlock (Linux), bashlock (macOS), lock(1) (BSD),
peaclock (Haiku) | optional | terminal locker (fallback: [cmatrix](https://github.com/abishekvashok/cmatrix)) | | advcpmv (Linux) ([integration](https://github.com/jarun/nnn/wiki/Advanced-use-cases#show-cp-mv-progress)) | optional | copy, move progress | | `$VISUAL` (else `$EDITOR`), `$PAGER`, `$SHELL` | optional | fallback vi, less, sh | diff --git a/src/nnn.c b/src/nnn.c index ea09ef034ea6a09bb577f07a6696b06cf8cf0162..85d52fe9707cc8cf5126e4dc6b4168866af78b52 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -4551,6 +4551,11 @@ goto begin; } } + if (!sb.st_size) { + printwait(messages[MSG_EMPTY_FILE], &presel); + goto nochange; + } + /* If NNN_USE_EDITOR is set, open text in EDITOR */ if (cfg.useeditor && #ifdef FILE_MIME_OPTS @@ -4563,11 +4568,6 @@ && strstr(g_buf, "text")) { #endif spawn(editor, newpath, NULL, path, F_CLI); continue; - } - - if (!sb.st_size) { - printwait(messages[MSG_EMPTY_FILE], &presel); - goto nochange; } if (!regexec(&archive_re, dents[cur].name, 0, NULL, 0)) {