1 | #ifndef DEFINE_FUNC_ATTRIBUTES |
2 | # define DEFINE_FUNC_ATTRIBUTES |
3 | #endif |
4 | #include "nvim/func_attr.h" |
5 | #undef DEFINE_FUNC_ATTRIBUTES |
6 | static void insert_enter(InsertState *s); |
7 | static int insert_check(VimState *state); |
8 | static int insert_execute(VimState *state, int key); |
9 | static int insert_handle_key(InsertState *s); |
10 | static void insert_do_complete(InsertState *s); |
11 | static void insert_do_cindent(InsertState *s); |
12 | static void ins_redraw(int ready ); |
13 | static void ins_ctrl_v(void); |
14 | static void undisplay_dollar(void); |
15 | static _Bool del_char_after_col(int limit_col); |
16 | static void ins_ctrl_x(void); |
17 | static _Bool check_compl_option(_Bool dict_opt); |
18 | static _Bool ins_compl_accept_char(int c) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT; |
19 | static int ins_compl_add(char_u *const str, int len, char_u *const fname, char_u *const *const cptext, const _Bool cptext_allocated, const Direction cdir, int flags_arg, const _Bool adup) FUNC_ATTR_NONNULL_ARG(1); |
20 | static _Bool ins_compl_equal(compl_T *match, char_u *str, size_t len) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ALL; |
21 | static void ins_compl_longest_match(compl_T *match); |
22 | static void ins_compl_add_matches(int num_matches, char_u **matches, int icase) FUNC_ATTR_NONNULL_ALL; |
23 | static int ins_compl_make_cyclic(void); |
24 | static void ins_compl_del_pum(void); |
25 | static _Bool pum_wanted(void) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT; |
26 | static _Bool pum_enough_matches(void) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT; |
27 | static void trigger_complete_changed_event(int cur); |
28 | static void ins_compl_dictionaries(char_u *dict_start, char_u *pat, int flags, int thesaurus ); |
29 | static void ins_compl_files(int count, char_u **files, int thesaurus, int flags, regmatch_T *regmatch, char_u *buf, int *dir); |
30 | static char_u *find_line_end(char_u *ptr); |
31 | static void ins_compl_free(void); |
32 | static void ins_compl_clear(void); |
33 | static char_u *ins_compl_mode(void); |
34 | static int ins_compl_bs(void); |
35 | static _Bool ins_compl_need_restart(void) FUNC_ATTR_PURE; |
36 | static void ins_compl_new_leader(void); |
37 | static int ins_compl_len(void); |
38 | static void ins_compl_addleader(int c); |
39 | static void ins_compl_restart(void); |
40 | static void ins_compl_set_original_text(char_u *str) FUNC_ATTR_NONNULL_ALL; |
41 | static void ins_compl_addfrommatch(void); |
42 | static _Bool ins_compl_prep(int c); |
43 | static void ins_compl_fixRedoBufForLeader(char_u *ptr_arg); |
44 | static buf_T *ins_compl_next_buf(buf_T *buf, int flag); |
45 | static void expand_by_function(int type, char_u *base ); |
46 | static void ins_compl_add_list(list_T *const list); |
47 | static void ins_compl_add_dict(dict_T *dict); |
48 | static int ins_compl_get_exp(pos_T *ini); |
49 | static void ins_compl_delete(void); |
50 | static void ins_compl_insert(int in_compl_func); |
51 | static dict_T *ins_compl_dict_alloc(compl_T *match); |
52 | static int ins_compl_next(int allow_get_expansion, int count, int insert_match, int in_compl_func ); |
53 | static int ins_compl_key2dir(int c); |
54 | static _Bool ins_compl_pum_key(int c) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT; |
55 | static int ins_compl_key2count(int c); |
56 | static _Bool ins_compl_use_match(int c) FUNC_ATTR_CONST FUNC_ATTR_WARN_UNUSED_RESULT; |
57 | static int ins_complete(int c, _Bool enable_pum); |
58 | static unsigned quote_meta(char_u *dest, char_u *src, int len); |
59 | static void insert_special(int c, int allow_modmask, int ctrlv); |
60 | static void internal_format(int textwidth, int second_indent, int flags, int format_only, int c ); |
61 | static void check_auto_format(_Bool end_insert ); |
62 | static void redo_literal(int c); |
63 | static void start_arrow(pos_T *end_insert_pos ); |
64 | static void start_arrow_with_change(pos_T *end_insert_pos, _Bool end_change); |
65 | static void start_arrow_common(pos_T *end_insert_pos, _Bool end_change); |
66 | static void check_spell_redraw(void); |
67 | static void spell_back_to_badword(void); |
68 | static void stop_insert(pos_T *end_insert_pos, int esc, int nomove ); |
69 | static _Bool echeck_abbr(int c) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT; |
70 | static int replace_pop(void); |
71 | static void replace_join(int off ); |
72 | static void replace_pop_ins(void); |
73 | static void mb_replace_pop_ins(int cc); |
74 | static void replace_flush(void); |
75 | static void replace_do_bs(int limit_col); |
76 | static _Bool cindent_on(void) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT; |
77 | static void ins_reg(void); |
78 | static void ins_ctrl_g(void); |
79 | static void ins_ctrl_hat(void); |
80 | static _Bool ins_esc(long *count, int cmdchar, _Bool nomove) FUNC_ATTR_NONNULL_ARG(1); |
81 | static void ins_ctrl_(void); |
82 | static _Bool ins_start_select(int c) FUNC_ATTR_WARN_UNUSED_RESULT; |
83 | static void ins_insert(int replaceState); |
84 | static void ins_ctrl_o(void); |
85 | static void ins_shift(int c, int lastc); |
86 | static void ins_del(void); |
87 | static void ins_bs_one(colnr_T *vcolp); |
88 | static _Bool ins_bs(int c, int mode, int *inserted_space_p) FUNC_ATTR_NONNULL_ARG(3); |
89 | static void ins_mouse(int c); |
90 | static void ins_mousescroll(int dir); |
91 | static void ins_left(void); |
92 | static void ins_home(int c); |
93 | static void ins_end(int c); |
94 | static void ins_s_left(void); |
95 | static void ins_right(void); |
96 | static void ins_s_right(void); |
97 | static void ins_up(int startcol ); |
98 | static void ins_pageup(void); |
99 | static void ins_down(int startcol ); |
100 | static void ins_pagedown(void); |
101 | static _Bool ins_tab(void) FUNC_ATTR_WARN_UNUSED_RESULT; |
102 | static _Bool ins_eol(int c); |
103 | static int ins_digraph(void); |
104 | static int ins_ctrl_ey(int tc); |
105 | static void ins_try_si(int c); |
106 | static colnr_T get_nolist_virtcol(void); |
107 | static char_u *do_insert_char_pre(int c); |
108 | static int ins_apply_autocmds(event_T event); |
109 | static void show_pum(int prev_w_wrow, int prev_w_leftcol); |
110 | #include "nvim/func_attr.h" |
111 | |