Mercurial > vim
comparison src/proto/option.pro @ 31996:ca6bc7c04163 v9.0.1330
patch 9.0.1330: handling new value of an option has a long "else if" chain
Commit: https://github.com/vim/vim/commit/af93691b53f38784efce0b93fe7644c44a7e382e
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Mon Feb 20 12:16:39 2023 +0000
patch 9.0.1330: handling new value of an option has a long "else if" chain
Problem: Handling new value of an option has a long "else if" chain.
Solution: Use a function pointer. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/12015)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 20 Feb 2023 13:30:05 +0100 |
parents | aec031683d61 |
children | e7ab58f57ea3 |
comparison
equal
deleted
inserted
replaced
31995:95971aa5e525 | 31996:ca6bc7c04163 |
---|---|
22 void redraw_titles(void); | 22 void redraw_titles(void); |
23 int valid_name(char_u *val, char *allowed); | 23 int valid_name(char_u *val, char *allowed); |
24 void set_option_sctx_idx(int opt_idx, int opt_flags, sctx_T script_ctx); | 24 void set_option_sctx_idx(int opt_idx, int opt_flags, sctx_T script_ctx); |
25 sctx_T *get_option_sctx(char *name); | 25 sctx_T *get_option_sctx(char *name); |
26 void set_term_option_sctx_idx(char *name, int opt_idx); | 26 void set_term_option_sctx_idx(char *name, int opt_idx); |
27 char *did_set_compatible(optset_T *args); | |
28 char *did_set_langremap(optset_T *args); | |
29 char *did_set_langnoremap(optset_T *args); | |
30 char *did_set_undofile(optset_T *args); | |
31 char *did_set_readonly(optset_T *args); | |
32 char *did_set_mousehide(optset_T *args); | |
33 char *did_set_modifiable(optset_T *args); | |
34 char *did_set_eof_eol_fixeol_bomb(optset_T *args); | |
35 char *did_set_binary(optset_T *args); | |
36 char *did_set_buflisted(optset_T *args); | |
37 char *did_set_swapfile(optset_T *args); | |
38 char *did_set_terse(optset_T *args); | |
39 char *did_set_paste(optset_T *args); | |
40 char *did_set_insertmode(optset_T *args); | |
41 char *did_set_ignorecase(optset_T *args); | |
42 char *did_set_hlsearch(optset_T *args); | |
43 char *did_set_scrollbind(optset_T *args); | |
44 char *did_set_previewwindow(optset_T *args); | |
45 char *did_set_smoothscroll(optset_T *args); | |
46 char *did_set_textmode(optset_T *args); | |
47 char *did_set_textauto(optset_T *args); | |
48 char *did_set_lisp(optset_T *args); | |
49 char *did_set_title_icon(optset_T *args); | |
50 char *did_set_modified(optset_T *args); | |
51 char *did_set_shellslash(optset_T *args); | |
52 char *did_set_wrap(optset_T *args); | |
53 char *did_set_equalalways(optset_T *args); | |
54 char *did_set_weirdinvert(optset_T *args); | |
55 char *did_set_ballooneval(optset_T *args); | |
56 char *did_set_balloonevalterm(optset_T *args); | |
57 char *did_set_autochdir(optset_T *args); | |
58 char *did_set_diff(optset_T *args); | |
59 char *did_set_imdisable(optset_T *args); | |
60 char *did_set_spell(optset_T *args); | |
61 char *did_set_arabic(optset_T *args); | |
62 char *did_set_number_relativenumber(optset_T *args); | |
63 char *did_set_termguicolors(optset_T *args); | |
64 char *did_set_winheight_helpheight(optset_T *args); | |
65 char *did_set_winminheight(optset_T *args); | |
66 char *did_set_winwidth(optset_T *args); | |
67 char *did_set_winminwidth(optset_T *args); | |
68 char *did_set_laststatus(optset_T *args); | |
69 char *did_set_showtabline(optset_T *args); | |
70 char *did_set_linespace(optset_T *args); | |
71 char *did_set_foldlevel(optset_T *args); | |
72 char *did_set_foldminlines(optset_T *args); | |
73 char *did_set_foldnestmax(optset_T *args); | |
74 char *did_set_foldcolumn(optset_T *args); | |
75 char *did_set_shiftwidth_tabstop(optset_T *args); | |
76 char *did_set_maxcombine(optset_T *args); | |
77 char *did_set_iminsert(optset_T *args); | |
78 char *did_set_imstyle(optset_T *args); | |
79 char *did_set_window(optset_T *args); | |
80 char *did_set_imsearch(optset_T *args); | |
81 char *did_set_titlelen(optset_T *args); | |
82 char *did_set_cmdheight(optset_T *args); | |
83 char *did_set_updatecount(optset_T *args); | |
84 char *did_set_conceallevel(optset_T *args); | |
85 char *did_set_pyxversion(optset_T *args); | |
86 char *did_set_numberwidth(optset_T *args); | |
87 char *did_set_textwidth(optset_T *args); | |
88 char *did_set_undolevels(optset_T *args); | |
27 void check_redraw(long_u flags); | 89 void check_redraw(long_u flags); |
28 int findoption(char_u *arg); | 90 int findoption(char_u *arg); |
29 getoption_T get_option_value(char_u *name, long *numval, char_u **stringval, int *flagsp, int scope); | 91 getoption_T get_option_value(char_u *name, long *numval, char_u **stringval, int *flagsp, int scope); |
30 int get_option_value_strict(char_u *name, long *numval, char_u **stringval, int opt_type, void *from); | 92 int get_option_value_strict(char_u *name, long *numval, char_u **stringval, int opt_type, void *from); |
31 char_u *option_iter_next(void **option, int opt_type); | 93 char_u *option_iter_next(void **option, int opt_type); |
53 int istermoption_idx(int opt_idx); | 115 int istermoption_idx(int opt_idx); |
54 void unset_global_local_option(char_u *name, void *from); | 116 void unset_global_local_option(char_u *name, void *from); |
55 char_u *get_option_varp_scope(int opt_idx, int scope); | 117 char_u *get_option_varp_scope(int opt_idx, int scope); |
56 char_u *get_option_var(int opt_idx); | 118 char_u *get_option_var(int opt_idx); |
57 char_u *get_option_fullname(int opt_idx); | 119 char_u *get_option_fullname(int opt_idx); |
120 opt_did_set_cb_T get_option_did_set_cb(int opt_idx); | |
58 char_u *get_equalprg(void); | 121 char_u *get_equalprg(void); |
59 void win_copy_options(win_T *wp_from, win_T *wp_to); | 122 void win_copy_options(win_T *wp_from, win_T *wp_to); |
60 void after_copy_winopt(win_T *wp); | 123 void after_copy_winopt(win_T *wp); |
61 void copy_winopt(winopt_T *from, winopt_T *to); | 124 void copy_winopt(winopt_T *from, winopt_T *to); |
62 void clear_winopt(winopt_T *wop); | 125 void clear_winopt(winopt_T *wop); |
70 int shortmess(int x); | 133 int shortmess(int x); |
71 void vimrc_found(char_u *fname, char_u *envname); | 134 void vimrc_found(char_u *fname, char_u *envname); |
72 void change_compatible(int on); | 135 void change_compatible(int on); |
73 int option_was_set(char_u *name); | 136 int option_was_set(char_u *name); |
74 int reset_option_was_set(char_u *name); | 137 int reset_option_was_set(char_u *name); |
75 void fill_breakat_flags(void); | 138 char *did_set_breakat(optset_T *args); |
76 int can_bs(int what); | 139 int can_bs(int what); |
77 long get_scrolloff_value(void); | 140 long get_scrolloff_value(void); |
78 long get_sidescrolloff_value(void); | 141 long get_sidescrolloff_value(void); |
79 unsigned int get_bkc_value(buf_T *buf); | 142 unsigned int get_bkc_value(buf_T *buf); |
80 char_u *get_flp_value(buf_T *buf); | 143 char_u *get_flp_value(buf_T *buf); |