]> Sergey Matveev's repositories - nnn.git/commitdiff
Fix #165
authorArun Prakash Jana <engineerarun@gmail.com>
Thu, 20 Dec 2018 16:34:48 +0000 (22:04 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Thu, 20 Dec 2018 16:44:26 +0000 (22:14 +0530)
src/nnn.c

index 3bcdca224ec1472126c765855590f7b0d73d9895..f292351eda49b0b97c63b561496c2e9b5282132d 100644 (file)
--- 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");