aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2018-12-20 22:04:48 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2018-12-20 22:14:26 +0530
commit75060f592395322c860f297e29fee695efc97c2a (patch)
tree548ed564e3e3a31772223f0c147f49b146ce225a /src
parent6a816a51857cf02a698257f1291daf66603f3ad9 (diff)
downloadnnn-75060f592395322c860f297e29fee695efc97c2a.tar.gz
Fix #165
Diffstat (limited to 'src')
-rw-r--r--src/nnn.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nnn.c b/src/nnn.c
index 3bcdca2..f292351 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -165,7 +165,7 @@ disabledbg()
#define ISODD(x) ((x) & 1)
#define TOUPPER(ch) \
(((ch) >= 'a' && (ch) <= 'z') ? ((ch) - 'a' + 'A') : (ch))
-#define CMD_LEN_MAX 5120
+#define CMD_LEN_MAX (PATH_MAX + ((NAME_MAX + 1) << 1))
#define CURSR " > "
#define EMPTY " "
#define CURSYM(flag) ((flag) ? CURSR : EMPTY)
@@ -3602,6 +3602,9 @@ int main(int argc, char *argv[])
return 1;
}
+ printf("%d\n", CMD_LEN_MAX);
+ return 0;
+
/* Get the context colors; copier used as tmp var */
if (cfg.showcolor) {
copier = getenv("NNN_CONTEXT_COLORS");