From c44d5b57bd8eb6bb6ff72fff76adc2129e349aa8 Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Thu, 2 Jan 2020 03:58:09 +0530 Subject: Update docs, early check for empty files --- src/nnn.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') 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') { -- cgit v1.2.3-70-g09d2