aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-10-14 17:58:16 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-10-14 17:58:16 +0530
commit04cba311284be91990057242409443159bd3a77c (patch)
treeaad181c07b9db6b901d5c43e14aa5d6a49e6e09f
parent2ac22cfc9f114eb40b9a6406c6816bd4ba732cf0 (diff)
downloadnnn-04cba311284be91990057242409443159bd3a77c.tar.gz
Use a macro for readability
-rw-r--r--src/nnn.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nnn.c b/src/nnn.c
index 27f5cee..b18f3d7 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -108,6 +108,7 @@
#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 {