mirror of
https://github.com/neovim/neovim.git
synced 2025-10-08 10:56:31 +00:00

Problem: Too many #ifdefs.
Solution: Graduate FEAT_VIRTUALEDIT. Adds about 10Kbyte to the code.
29ddebef40
37 lines
767 B
C
37 lines
767 B
C
#ifndef NVIM_POS_H
|
|
#define NVIM_POS_H
|
|
|
|
typedef long linenr_T; // line number type
|
|
/// Format used to print values which have linenr_T type
|
|
#define PRIdLINENR "ld"
|
|
|
|
/// Column number type
|
|
typedef int colnr_T;
|
|
/// Format used to print values which have colnr_T type
|
|
#define PRIdCOLNR "d"
|
|
|
|
/// Maximal (invalid) line number
|
|
enum { MAXLNUM = 0x7fffffff };
|
|
/// Maximal column number, 31 bits
|
|
enum { MAXCOL = 0x7fffffff };
|
|
|
|
/*
|
|
* position in file or buffer
|
|
*/
|
|
typedef struct {
|
|
linenr_T lnum; /* line number */
|
|
colnr_T col; /* column number */
|
|
colnr_T coladd;
|
|
} pos_T;
|
|
|
|
|
|
/*
|
|
* Same, but without coladd.
|
|
*/
|
|
typedef struct {
|
|
linenr_T lnum; /* line number */
|
|
colnr_T col; /* column number */
|
|
} lpos_T;
|
|
|
|
#endif // NVIM_POS_H
|