aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMiyelsh <miyelsh@gmail.com>2022-04-04 03:18:00 -0400
committerGitHub <noreply@github.com>2022-04-04 15:18:00 +0800
commitb08cf73be959397b5715395f1465fb76a76a6a05 (patch)
treecf0b562d73a5d3ec0fab6b04b219e13b5d78cc99 /src
parentc41e75039f5516a0626d0da69cb15bac7e7fe6de (diff)
downloadrneovim-b08cf73be959397b5715395f1465fb76a76a6a05.tar.gz
rneovim-b08cf73be959397b5715395f1465fb76a76a6a05.tar.bz2
rneovim-b08cf73be959397b5715395f1465fb76a76a6a05.zip
refactor(pos.h): remove unused include; make formatting consistent (#17892)
- remove include of limit.h from pos.h, because it is no longer used - make formatting more consistent in pos.h
Diffstat (limited to 'src')
-rw-r--r--src/nvim/pos.h30
1 files changed, 13 insertions, 17 deletions
diff --git a/src/nvim/pos.h b/src/nvim/pos.h
index 51991ed314..c60b008696 100644
--- a/src/nvim/pos.h
+++ b/src/nvim/pos.h
@@ -1,10 +1,8 @@
#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
+/// Line number type
+typedef long linenr_T;
/// Format used to print values which have linenr_T type
#define PRIdLINENR "ld"
@@ -15,31 +13,29 @@ typedef int colnr_T;
/// Maximal (invalid) line number
enum { MAXLNUM = 0x7fffffff, };
+
/// Maximal column number
/// MAXCOL used to be INT_MAX, but with 64 bit ints that results in running
/// out of memory when trying to allocate a very long line.
enum { MAXCOL = 0x7fffffff, };
-// Minimum line number
+
+/// Minimum line number
enum { MINLNUM = 1, };
-// minimum column number
+
+/// Minimum column number
enum { MINCOL = 1, };
-/*
- * position in file or buffer
- */
+/// position in file or buffer
typedef struct {
- linenr_T lnum; // line number
- colnr_T col; // column number
+ linenr_T lnum; ///< line number
+ colnr_T col; ///< column number
colnr_T coladd;
} pos_T;
-
-/*
- * Same, but without coladd.
- */
+/// position in file or buffer, but without coladd
typedef struct {
- linenr_T lnum; // line number
- colnr_T col; // column number
+ linenr_T lnum; ///< line number
+ colnr_T col; ///< column number
} lpos_T;
#endif // NVIM_POS_H