mirror of
https://github.com/neovim/neovim.git
synced 2025-10-01 07:28:34 +00:00
refactor: pos_T macros to functions (#6496)
This commit is contained in:

committed by
Justin M. Keyes

parent
1b94852ccb
commit
2d72d85b23
@@ -28,25 +28,6 @@
|
||||
/// @return `s, sizeof(s) - 1`
|
||||
#define S_LEN(s) (s), (sizeof(s) - 1)
|
||||
|
||||
/*
|
||||
* Position comparisons
|
||||
*/
|
||||
# define lt(a, b) (((a).lnum != (b).lnum) \
|
||||
? (a).lnum < (b).lnum \
|
||||
: (a).col != (b).col \
|
||||
? (a).col < (b).col \
|
||||
: (a).coladd < (b).coladd)
|
||||
# define ltp(a, b) (((a)->lnum != (b)->lnum) \
|
||||
? (a)->lnum < (b)->lnum \
|
||||
: (a)->col != (b)->col \
|
||||
? (a)->col < (b)->col \
|
||||
: (a)->coladd < (b)->coladd)
|
||||
# define equalpos(a, b) (((a).lnum == (b).lnum) && ((a).col == (b).col) && \
|
||||
((a).coladd == (b).coladd))
|
||||
# define clearpos(a) {(a)->lnum = 0; (a)->col = 0; (a)->coladd = 0; }
|
||||
|
||||
#define ltoreq(a, b) (lt(a, b) || equalpos(a, b))
|
||||
|
||||
/*
|
||||
* lineempty() - return TRUE if the line is empty
|
||||
*/
|
||||
|
Reference in New Issue
Block a user