annotate src/proto/insexpand.pro @ 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 13ba00ef7687
children 8b15e4161605
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16142
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
1 /* insexpand.c */
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
2 void ins_ctrl_x(void);
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
3 int ctrl_x_mode_none(void);
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
4 int ctrl_x_mode_normal(void);
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
5 int ctrl_x_mode_scroll(void);
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
6 int ctrl_x_mode_whole_line(void);
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
7 int ctrl_x_mode_files(void);
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8 int ctrl_x_mode_tags(void);
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
9 int ctrl_x_mode_path_patterns(void);
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
10 int ctrl_x_mode_path_defines(void);
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
11 int ctrl_x_mode_dictionary(void);
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12 int ctrl_x_mode_thesaurus(void);
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
13 int ctrl_x_mode_cmdline(void);
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
14 int ctrl_x_mode_function(void);
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
15 int ctrl_x_mode_omni(void);
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
16 int ctrl_x_mode_spell(void);
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
17 int ctrl_x_mode_line_or_eval(void);
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
18 int ctrl_x_mode_not_default(void);
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
19 int ctrl_x_mode_not_defined_yet(void);
26944
8dbdd68627bd patch 8.2.4001: insert complete code uses global variables
Bram Moolenaar <Bram@vim.org>
parents: 26518
diff changeset
20 int compl_status_adding(void);
8dbdd68627bd patch 8.2.4001: insert complete code uses global variables
Bram Moolenaar <Bram@vim.org>
parents: 26518
diff changeset
21 int compl_status_sol(void);
8dbdd68627bd patch 8.2.4001: insert complete code uses global variables
Bram Moolenaar <Bram@vim.org>
parents: 26518
diff changeset
22 int compl_status_local(void);
8dbdd68627bd patch 8.2.4001: insert complete code uses global variables
Bram Moolenaar <Bram@vim.org>
parents: 26518
diff changeset
23 void compl_status_clear(void);
16142
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
24 int has_compl_option(int dict_opt);
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
25 int vim_is_ctrl_x_key(int c);
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
26 int ins_compl_accept_char(int c);
16239
5df26b29e809 patch 8.1.1124: insert completion flags are mixed up
Bram Moolenaar <Bram@vim.org>
parents: 16142
diff changeset
27 int ins_compl_add_infercase(char_u *str_arg, int len, int icase, char_u *fname, int dir, int cont_s_ipos);
16142
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
28 int ins_compl_has_shown_match(void);
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
29 int ins_compl_long_shown_match(void);
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
30 void completeopt_was_set(void);
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
31 int pum_wanted(void);
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
32 void ins_compl_show_pum(void);
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
33 char_u *find_word_start(char_u *ptr);
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
34 char_u *find_word_end(char_u *ptr);
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
35 void ins_compl_clear(void);
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
36 int ins_compl_active(void);
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
37 int ins_compl_used_match(void);
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
38 void ins_compl_init_get_longest(void);
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
39 int ins_compl_interrupted(void);
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
40 int ins_compl_enter_selects(void);
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
41 colnr_T ins_compl_col(void);
26944
8dbdd68627bd patch 8.2.4001: insert complete code uses global variables
Bram Moolenaar <Bram@vim.org>
parents: 26518
diff changeset
42 int ins_compl_len(void);
16142
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
43 int ins_compl_bs(void);
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
44 void ins_compl_addleader(int c);
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
45 void ins_compl_addfrommatch(void);
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
46 int ins_compl_prep(int c);
26388
8aba638e91eb patch 8.2.3725: cannot use a lambda for 'completefunc' and 'omnifunc'
Bram Moolenaar <Bram@vim.org>
parents: 17704
diff changeset
47 int set_completefunc_option(void);
8aba638e91eb patch 8.2.3725: cannot use a lambda for 'completefunc' and 'omnifunc'
Bram Moolenaar <Bram@vim.org>
parents: 17704
diff changeset
48 void set_buflocal_cfu_callback(buf_T *buf);
8aba638e91eb patch 8.2.3725: cannot use a lambda for 'completefunc' and 'omnifunc'
Bram Moolenaar <Bram@vim.org>
parents: 17704
diff changeset
49 int set_omnifunc_option(void);
8aba638e91eb patch 8.2.3725: cannot use a lambda for 'completefunc' and 'omnifunc'
Bram Moolenaar <Bram@vim.org>
parents: 17704
diff changeset
50 void set_buflocal_ofu_callback(buf_T *buf);
8aba638e91eb patch 8.2.3725: cannot use a lambda for 'completefunc' and 'omnifunc'
Bram Moolenaar <Bram@vim.org>
parents: 17704
diff changeset
51 int set_thesaurusfunc_option(void);
26518
13ba00ef7687 patch 8.2.3788: lambda for option that is a function may be freed
Bram Moolenaar <Bram@vim.org>
parents: 26388
diff changeset
52 int set_ref_in_insexpand_funcs(int copyID);
17704
73a93aae5f68 patch 8.1.1849
Bram Moolenaar <Bram@vim.org>
parents: 16239
diff changeset
53 void f_complete(typval_T *argvars, typval_T *rettv);
73a93aae5f68 patch 8.1.1849
Bram Moolenaar <Bram@vim.org>
parents: 16239
diff changeset
54 void f_complete_add(typval_T *argvars, typval_T *rettv);
73a93aae5f68 patch 8.1.1849
Bram Moolenaar <Bram@vim.org>
parents: 16239
diff changeset
55 void f_complete_check(typval_T *argvars, typval_T *rettv);
73a93aae5f68 patch 8.1.1849
Bram Moolenaar <Bram@vim.org>
parents: 16239
diff changeset
56 void f_complete_info(typval_T *argvars, typval_T *rettv);
16142
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
57 void ins_compl_delete(void);
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
58 void ins_compl_insert(int in_compl_func);
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
59 void ins_compl_check_keys(int frequency, int in_compl_func);
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
60 int ins_complete(int c, int enable_pum);
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
61 void free_insexpand_stuff(void);
570a296aa0b4 patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
62 /* vim: set ft=c : */