aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Maxim Baz <git@maximbaz.com>2019-12-19 14:11:30 +0100
committerGravatar Mischievous Meerkat <engineerarun@gmail.com>2019-12-19 18:41:30 +0530
commitc5cd668a522f607db139a80851e3fa465594a894 (patch)
tree9371ba8c000c4eafe762dca14e674633691666e6 /src
parentc24efdbedbd3325e2a890810830f84fd3979d851 (diff)
downloadnnn-c5cd668a522f607db139a80851e3fa465594a894.tar.gz
Show 'invalid key' prompt in more places (#415)
Diffstat (limited to 'src')
-rw-r--r--src/nnn.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/nnn.c b/src/nnn.c
index a30320b..cf2826f 100644
--- 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;