]> Sergey Matveev's repositories - nnn.git/commitdiff
Use a macro for readability
authorArun Prakash Jana <engineerarun@gmail.com>
Mon, 14 Oct 2019 12:28:16 +0000 (17:58 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Mon, 14 Oct 2019 12:28:16 +0000 (17:58 +0530)
src/nnn.c

index 27f5cee894d01d2a6bbe0ba43675a51f97e79523..b18f3d79164c15e2409c3e963d1c791676d054da 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
 #endif
 
 #define _ABSSUB(N, M) (((N) <= (M)) ? ((M) - (N)) : ((N) - (M)))
+#define DOUBLECLICK_INTERVAL_NS 400000000
 #define LEN(x) (sizeof(x) / sizeof(*(x)))
 #undef MIN
 #define MIN(x, y) ((x) < (y) ? (x) : (y))
@@ -3743,7 +3744,7 @@ nochange:
                                /*Single click just selects, double click also opens */
                                if (((_ABSSUB(mousetimings[0].tv_sec, mousetimings[1].tv_sec) << 30)
                                  + (mousetimings[0].tv_nsec - mousetimings[1].tv_nsec))
-                                       > 400000000)
+                                       > DOUBLECLICK_INTERVAL_NS)
                                        break;
                                mousetimings[currentmouse].tv_sec = 0;
                        } else {