aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-01-02 03:58:09 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-01-02 04:03:54 +0530
commitc44d5b57bd8eb6bb6ff72fff76adc2129e349aa8 (patch)
treeb224d6dab179e6309530937c6071529c9d2084a7 /src
parentc6a5db460f7e6fd72ebebc247fd0ce29403cb0f9 (diff)
downloadnnn-c44d5b57bd8eb6bb6ff72fff76adc2129e349aa8.tar.gz
Update docs, early check for empty files
Diffstat (limited to 'src')
-rw-r--r--src/nnn.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nnn.c b/src/nnn.c
index ea09ef0..85d52fe 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -4551,6 +4551,11 @@ nochange:
}
}
+ 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
@@ -4565,11 +4570,6 @@ nochange:
continue;
}
- if (!sb.st_size) {
- printwait(messages[MSG_EMPTY_FILE], &presel);
- goto nochange;
- }
-
if (!regexec(&archive_re, dents[cur].name, 0, NULL, 0)) {
r = get_input(messages[MSG_ARCHIVE_OPTS]);
if (r == 'l' || r == 'x') {