]> Sergey Matveev's repositories - nnn.git/commitdiff
Add check for empty selection
authorKlzXS <klzx+github@klzx.cf>
Tue, 16 Feb 2021 21:33:42 +0000 (21:33 +0000)
committerKlzXS <klzx+github@klzx.cf>
Tue, 16 Feb 2021 21:33:42 +0000 (21:33 +0000)
nop when empty

src/nnn.c

index e8b98de900265001c04278c02f9d962dd7547c9b..d4fa5d80385542a92b91fd91195db9d1d8a6b36c 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -2084,6 +2084,11 @@ static bool cpmvrm_selection(enum action sel, char *path)
 {
        int r;
 
+       if (!selbufpos) {
+               printmsg(messages[MSG_0_SELECTED]);
+               return FALSE;
+       }
+
        if (!selsafe())
                return FALSE;