aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/pos.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/pos.h')
-rw-r--r--src/nvim/pos.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nvim/pos.h b/src/nvim/pos.h
index 8e86ea08c5..b7c4b6ef92 100644
--- a/src/nvim/pos.h
+++ b/src/nvim/pos.h
@@ -1,6 +1,9 @@
#ifndef NVIM_POS_H
#define NVIM_POS_H
+// for INT_MAX, LONG_MAX et al.
+#include <limits.h>
+
typedef long linenr_T; // line number type
/// Format used to print values which have linenr_T type
#define PRIdLINENR "ld"
@@ -12,8 +15,8 @@ typedef int colnr_T;
/// Maximal (invalid) line number
enum { MAXLNUM = 0x7fffffff };
-/// Maximal column number, 31 bits
-enum { MAXCOL = 0x7fffffff };
+/// Maximal column number
+enum { MAXCOL = INT_MAX };
// Minimum line number
enum { MINLNUM = 1 };
// minimum column number