summaryrefslogtreecommitdiffstats
path: root/src/structs.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-01-26 17:28:26 +0100
committerBram Moolenaar <Bram@vim.org>2019-01-26 17:28:26 +0100
commit29ddebef4038d2d2b3bc9d8d3b0109f4046d6fbf (patch)
tree66144403e05268df8594b01d0298db4f570ed60f /src/structs.h
parent3e460fd8b72db905fbf9f01b00371384ffc415b8 (diff)
patch 8.1.0826: too many #ifdefsv8.1.0826
Problem: Too many #ifdefs. Solution: Graduate FEAT_VIRTUALEDIT. Adds about 10Kbyte to the code.
Diffstat (limited to 'src/structs.h')
-rw-r--r--src/structs.h21
1 files changed, 6 insertions, 15 deletions
diff --git a/src/structs.h b/src/structs.h
index e25ae17386..459103d3a4 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -21,30 +21,23 @@ typedef unsigned short short_u;
#endif
/*
- * position in file or buffer
+ * Position in file or buffer.
*/
typedef struct
{
- linenr_T lnum; /* line number */
- colnr_T col; /* column number */
-#ifdef FEAT_VIRTUALEDIT
- colnr_T coladd;
-#endif
+ linenr_T lnum; // line number
+ colnr_T col; // column number
+ colnr_T coladd; // extra virtual column
} pos_T;
-#ifdef FEAT_VIRTUALEDIT
-# define INIT_POS_T(l, c, ca) {l, c, ca}
-#else
-# define INIT_POS_T(l, c, ca) {l, c}
-#endif
/*
* Same, 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;
/*
@@ -395,9 +388,7 @@ struct u_header
u_entry_T *uh_entry; /* pointer to first entry */
u_entry_T *uh_getbot_entry; /* pointer to where ue_bot must be set */
pos_T uh_cursor; /* cursor position before saving */
-#ifdef FEAT_VIRTUALEDIT
long uh_cursor_vcol;
-#endif
int uh_flags; /* see below */
pos_T uh_namedm[NMARKS]; /* marks before undo/after redo */
visualinfo_T uh_visual; /* Visual areas before undo/after redo */