]> Sergey Matveev's repositories - nnn.git/commitdiff
Show 'invalid key' prompt in more places (#415)
authorMaxim Baz <git@maximbaz.com>
Thu, 19 Dec 2019 13:11:30 +0000 (14:11 +0100)
committerMischievous Meerkat <engineerarun@gmail.com>
Thu, 19 Dec 2019 13:11:30 +0000 (18:41 +0530)
src/nnn.c

index a30320bffe49f79de428cf69073b5bd167f317fd..cf2826fd1a5ccef8246b2fddaf8b8b3c3cefcba7 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -3339,7 +3339,7 @@ static bool remote_mount(char *newpath, int *presel)
                cmd = utils[UTIL_RCLONE];
                env = xgetenv("NNN_RCLONE_OPTS", "rclone mount");
        } else {
-               printwait(messages[MSG_FAILED], presel);
+               printwait(messages[MSG_INVALID_KEY], presel);
                return FALSE;
        }
 
@@ -5338,8 +5338,16 @@ nochange:
                                goto begin;
                        }
 
-                       if (r != 'm' || !archive_mount(dents[cur].name, path, newpath, &presel))
-                               goto nochange; // fallthrough
+                       if (r != 'm') {
+                               printwait(messages[MSG_INVALID_KEY], &presel);
+                               goto nochange;
+                       }
+
+                       if (!archive_mount(dents[cur].name, path, newpath, &presel)) {
+                               printwait(messages[MSG_FAILED], &presel);
+                               goto nochange;
+                       }
+                       // fallthrough
                case SEL_REMOTE:
                        if (sel == SEL_REMOTE && !remote_mount(newpath, &presel))
                                goto nochange;