mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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
This commit is contained in:
parent
c41e75039f
commit
b08cf73be9
@ -1,10 +1,8 @@
|
|||||||
#ifndef NVIM_POS_H
|
#ifndef NVIM_POS_H
|
||||||
#define NVIM_POS_H
|
#define NVIM_POS_H
|
||||||
|
|
||||||
// for INT_MAX, LONG_MAX et al.
|
/// Line number type
|
||||||
#include <limits.h>
|
typedef long linenr_T;
|
||||||
|
|
||||||
typedef long linenr_T; // line number type
|
|
||||||
/// Format used to print values which have linenr_T type
|
/// Format used to print values which have linenr_T type
|
||||||
#define PRIdLINENR "ld"
|
#define PRIdLINENR "ld"
|
||||||
|
|
||||||
@ -15,31 +13,29 @@ typedef int colnr_T;
|
|||||||
|
|
||||||
/// Maximal (invalid) line number
|
/// Maximal (invalid) line number
|
||||||
enum { MAXLNUM = 0x7fffffff, };
|
enum { MAXLNUM = 0x7fffffff, };
|
||||||
|
|
||||||
/// Maximal column number
|
/// Maximal column number
|
||||||
/// MAXCOL used to be INT_MAX, but with 64 bit ints that results in running
|
/// 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.
|
/// out of memory when trying to allocate a very long line.
|
||||||
enum { MAXCOL = 0x7fffffff, };
|
enum { MAXCOL = 0x7fffffff, };
|
||||||
// Minimum line number
|
|
||||||
|
/// Minimum line number
|
||||||
enum { MINLNUM = 1, };
|
enum { MINLNUM = 1, };
|
||||||
// minimum column number
|
|
||||||
|
/// Minimum column number
|
||||||
enum { MINCOL = 1, };
|
enum { MINCOL = 1, };
|
||||||
|
|
||||||
/*
|
/// position in file or buffer
|
||||||
* position in file or buffer
|
|
||||||
*/
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
linenr_T lnum; // line number
|
linenr_T lnum; ///< line number
|
||||||
colnr_T col; // column number
|
colnr_T col; ///< column number
|
||||||
colnr_T coladd;
|
colnr_T coladd;
|
||||||
} pos_T;
|
} pos_T;
|
||||||
|
|
||||||
|
/// position in file or buffer, but without coladd
|
||||||
/*
|
|
||||||
* Same, but without coladd.
|
|
||||||
*/
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
linenr_T lnum; // line number
|
linenr_T lnum; ///< line number
|
||||||
colnr_T col; // column number
|
colnr_T col; ///< column number
|
||||||
} lpos_T;
|
} lpos_T;
|
||||||
|
|
||||||
#endif // NVIM_POS_H
|
#endif // NVIM_POS_H
|
||||||
|
Loading…
Reference in New Issue
Block a user