]> Sergey Matveev's repositories - nnn.git/commitdiff
Fail operations if selection file is empty
authorArun Prakash Jana <engineerarun@gmail.com>
Wed, 11 Aug 2021 18:50:13 +0000 (00:20 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Wed, 11 Aug 2021 18:50:13 +0000 (00:20 +0530)
src/nnn.c

index 0d58ca25eed1de348190ac25d28a931b35a88659..b7654280798ca9cf4fb4193e37b82339abc6123b 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -2541,7 +2541,9 @@ static bool cpmvrm_selection(enum action sel, char *path)
 {
        int r;
 
-       if (!selbufpos && isselfileempty()) {
+       if (isselfileempty()) {
+               if (nselected)
+                       clearselection();
                printmsg(messages[MSG_0_SELECTED]);
                return FALSE;
        }