patch 8.1.0826: too many #ifdefs
Problem: Too many #ifdefs.
Solution: Graduate FEAT_VIRTUALEDIT. Adds about 10Kbyte to the code.
diff --git a/src/structs.h b/src/structs.h
index e25ae17..459103d 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -21,30 +21,23 @@
#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 @@
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 */