mirror of
https://github.com/jarun/nnn.git
synced 2024-12-02 19:36:51 +00:00
Remove redundant message
This commit is contained in:
parent
5902af230d
commit
3625d5adbb
23
nnn.c
23
nnn.c
|
@ -299,17 +299,15 @@ static char * const utils[] = {
|
||||||
|
|
||||||
/* Common strings */
|
/* Common strings */
|
||||||
#define STR_NFTWFAIL_ID 0
|
#define STR_NFTWFAIL_ID 0
|
||||||
#define STR_ATROOT_ID 1
|
#define STR_NOHOME_ID 1
|
||||||
#define STR_NOHOME_ID 2
|
#define STR_INPUT_ID 2
|
||||||
#define STR_INPUT_ID 3
|
#define STR_INVBM_ID 3
|
||||||
#define STR_INVBM_ID 4
|
#define STR_COPY_ID 4
|
||||||
#define STR_COPY_ID 5
|
#define STR_DATE_ID 5
|
||||||
#define STR_DATE_ID 6
|
|
||||||
|
|
||||||
static const char messages[][16] =
|
static const char messages[][16] =
|
||||||
{
|
{
|
||||||
"nftw failed",
|
"nftw failed",
|
||||||
"already at /",
|
|
||||||
"HOME not set",
|
"HOME not set",
|
||||||
"no traversal",
|
"no traversal",
|
||||||
"invalid key",
|
"invalid key",
|
||||||
|
@ -2460,7 +2458,10 @@ nochange:
|
||||||
case SEL_BACK:
|
case SEL_BACK:
|
||||||
/* There is no going back */
|
/* There is no going back */
|
||||||
if (istopdir(path)) {
|
if (istopdir(path)) {
|
||||||
printmsg(messages[STR_ATROOT_ID]);
|
/* Continue in navigate-as-you-type mode, if enabled */
|
||||||
|
if (cfg.filtermode)
|
||||||
|
presel = FILTER;
|
||||||
|
|
||||||
goto nochange;
|
goto nochange;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2652,8 +2653,12 @@ nochange:
|
||||||
|
|
||||||
/* Show a message if already at / */
|
/* Show a message if already at / */
|
||||||
if (istopdir(path)) {
|
if (istopdir(path)) {
|
||||||
printmsg(messages[STR_ATROOT_ID]);
|
|
||||||
free(input);
|
free(input);
|
||||||
|
|
||||||
|
/* Continue in navigate-as-you-type mode, if enabled */
|
||||||
|
if (cfg.filtermode)
|
||||||
|
presel = FILTER;
|
||||||
|
|
||||||
goto nochange;
|
goto nochange;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue