comparison src/structs.h @ 15636:6f1c7e9a6393 v8.1.0826

patch 8.1.0826: too many #ifdefs commit https://github.com/vim/vim/commit/29ddebef4038d2d2b3bc9d8d3b0109f4046d6fbf Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 26 17:28:26 2019 +0100 patch 8.1.0826: too many #ifdefs Problem: Too many #ifdefs. Solution: Graduate FEAT_VIRTUALEDIT. Adds about 10Kbyte to the code.
author Bram Moolenaar <Bram@vim.org>
date Sat, 26 Jan 2019 17:30:15 +0100
parents 2dcaa860e3fc
children 287104a1d51e
comparison
equal deleted inserted replaced
15635:c51d2a06f5f9 15636:6f1c7e9a6393
19 typedef int colnr_T; 19 typedef int colnr_T;
20 typedef unsigned short short_u; 20 typedef unsigned short short_u;
21 #endif 21 #endif
22 22
23 /* 23 /*
24 * position in file or buffer 24 * Position in file or buffer.
25 */ 25 */
26 typedef struct 26 typedef struct
27 { 27 {
28 linenr_T lnum; /* line number */ 28 linenr_T lnum; // line number
29 colnr_T col; /* column number */ 29 colnr_T col; // column number
30 #ifdef FEAT_VIRTUALEDIT 30 colnr_T coladd; // extra virtual column
31 colnr_T coladd;
32 #endif
33 } pos_T; 31 } pos_T;
34 32
35 #ifdef FEAT_VIRTUALEDIT
36 # define INIT_POS_T(l, c, ca) {l, c, ca}
37 #else
38 # define INIT_POS_T(l, c, ca) {l, c}
39 #endif
40 33
41 /* 34 /*
42 * Same, but without coladd. 35 * Same, but without coladd.
43 */ 36 */
44 typedef struct 37 typedef struct
45 { 38 {
46 linenr_T lnum; /* line number */ 39 linenr_T lnum; // line number
47 colnr_T col; /* column number */ 40 colnr_T col; // column number
48 } lpos_T; 41 } lpos_T;
49 42
50 /* 43 /*
51 * Structure used for growing arrays. 44 * Structure used for growing arrays.
52 * This is used to store information that only grows, is deleted all at 45 * This is used to store information that only grows, is deleted all at
393 long uh_seq; /* sequence number, higher == newer undo */ 386 long uh_seq; /* sequence number, higher == newer undo */
394 int uh_walk; /* used by undo_time() */ 387 int uh_walk; /* used by undo_time() */
395 u_entry_T *uh_entry; /* pointer to first entry */ 388 u_entry_T *uh_entry; /* pointer to first entry */
396 u_entry_T *uh_getbot_entry; /* pointer to where ue_bot must be set */ 389 u_entry_T *uh_getbot_entry; /* pointer to where ue_bot must be set */
397 pos_T uh_cursor; /* cursor position before saving */ 390 pos_T uh_cursor; /* cursor position before saving */
398 #ifdef FEAT_VIRTUALEDIT
399 long uh_cursor_vcol; 391 long uh_cursor_vcol;
400 #endif
401 int uh_flags; /* see below */ 392 int uh_flags; /* see below */
402 pos_T uh_namedm[NMARKS]; /* marks before undo/after redo */ 393 pos_T uh_namedm[NMARKS]; /* marks before undo/after redo */
403 visualinfo_T uh_visual; /* Visual areas before undo/after redo */ 394 visualinfo_T uh_visual; /* Visual areas before undo/after redo */
404 time_T uh_time; /* timestamp when the change was made */ 395 time_T uh_time; /* timestamp when the change was made */
405 long uh_save_nr; /* set when the file was saved after the 396 long uh_save_nr; /* set when the file was saved after the