comparison src/globals.h @ 26944:8dbdd68627bd v8.2.4001

patch 8.2.4001: insert complete code uses global variables Commit: https://github.com/vim/vim/commit/d94fbfc74a8b8073e7a256c95fa6f39fc527c726 Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Tue Jan 4 17:01:44 2022 +0000 patch 8.2.4001: insert complete code uses global variables Problem: Insert complete code uses global variables. Solution: Make variables local to the file and use accessor functions. (Yegappan Lakshmanan, closes #9470)
author Bram Moolenaar <Bram@vim.org>
date Tue, 04 Jan 2022 18:15:03 +0100
parents 612339679616
children 268f6a3511df
comparison
equal deleted inserted replaced
26943:61f686b38df9 26944:8dbdd68627bd
160 EXTERN colnr_T dollar_vcol INIT(= -1); 160 EXTERN colnr_T dollar_vcol INIT(= -1);
161 161
162 /* 162 /*
163 * Variables for Insert mode completion. 163 * Variables for Insert mode completion.
164 */ 164 */
165
166 // Length in bytes of the text being completed (this is deleted to be replaced
167 // by the match.)
168 EXTERN int compl_length INIT(= 0);
169
170 // List of flags for method of completion.
171 EXTERN int compl_cont_status INIT(= 0);
172 # define CONT_ADDING 1 // "normal" or "adding" expansion
173 # define CONT_INTRPT (2 + 4) // a ^X interrupted the current expansion
174 // it's set only iff N_ADDS is set
175 # define CONT_N_ADDS 4 // next ^X<> will add-new or expand-current
176 # define CONT_S_IPOS 8 // next ^X<> will set initial_pos?
177 // if so, word-wise-expansion will set SOL
178 # define CONT_SOL 16 // pattern includes start of line, just for
179 // word-wise expansion, not set for ^X^L
180 # define CONT_LOCAL 32 // for ctrl_x_mode 0, ^X^P/^X^N do a local
181 // expansion, (eg use complete=.)
182 165
183 EXTERN char_u *edit_submode INIT(= NULL); // msg for CTRL-X submode 166 EXTERN char_u *edit_submode INIT(= NULL); // msg for CTRL-X submode
184 EXTERN char_u *edit_submode_pre INIT(= NULL); // prepended to edit_submode 167 EXTERN char_u *edit_submode_pre INIT(= NULL); // prepended to edit_submode
185 EXTERN char_u *edit_submode_extra INIT(= NULL);// appended to edit_submode 168 EXTERN char_u *edit_submode_extra INIT(= NULL);// appended to edit_submode
186 EXTERN hlf_T edit_submode_highl; // highl. method for extra info 169 EXTERN hlf_T edit_submode_highl; // highl. method for extra info