aboutsummaryrefslogtreecommitdiffstats
path: root/nnn.c
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2018-05-10 17:23:10 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2018-05-10 17:23:10 +0530
commit3625d5adbb7c0d16d41da06e278ec2500a1f47d5 (patch)
treef4a26b659b922bc3e3e87a3709a5d80ef8028b3a /nnn.c
parent5902af230dadcb7ae7f13abab2e863648341c216 (diff)
downloadnnn-3625d5adbb7c0d16d41da06e278ec2500a1f47d5.tar.gz
Remove redundant message
Diffstat (limited to 'nnn.c')
-rw-r--r--nnn.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/nnn.c b/nnn.c
index 3efc660..db3a516 100644
--- a/nnn.c
+++ b/nnn.c
@@ -299,17 +299,15 @@ static char * const utils[] = {
/* Common strings */
#define STR_NFTWFAIL_ID 0
-#define STR_ATROOT_ID 1
-#define STR_NOHOME_ID 2
-#define STR_INPUT_ID 3
-#define STR_INVBM_ID 4
-#define STR_COPY_ID 5
-#define STR_DATE_ID 6
+#define STR_NOHOME_ID 1
+#define STR_INPUT_ID 2
+#define STR_INVBM_ID 3
+#define STR_COPY_ID 4
+#define STR_DATE_ID 5
static const char messages[][16] =
{
"nftw failed",
- "already at /",
"HOME not set",
"no traversal",
"invalid key",
@@ -2460,7 +2458,10 @@ nochange:
case SEL_BACK:
/* There is no going back */
if (istopdir(path)) {
- printmsg(messages[STR_ATROOT_ID]);
+ /* Continue in navigate-as-you-type mode, if enabled */
+ if (cfg.filtermode)
+ presel = FILTER;
+
goto nochange;
}
@@ -2652,8 +2653,12 @@ nochange:
/* Show a message if already at / */
if (istopdir(path)) {
- printmsg(messages[STR_ATROOT_ID]);
free(input);
+
+ /* Continue in navigate-as-you-type mode, if enabled */
+ if (cfg.filtermode)
+ presel = FILTER;
+
goto nochange;
}