diff options
Diffstat (limited to 'src/nvim/optionstr.c')
-rw-r--r-- | src/nvim/optionstr.c | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/src/nvim/optionstr.c b/src/nvim/optionstr.c index 632b4af573..9b7b50ae04 100644 --- a/src/nvim/optionstr.c +++ b/src/nvim/optionstr.c @@ -567,7 +567,7 @@ int expand_set_backspace(optexpand_T *args, int *numMatches, char ***matches) /// The 'backupcopy' option is changed. const char *did_set_backupcopy(optset_T *args) { - buf_T *buf = args->os_ctx.buf; + buf_T *buf = (buf_T *)args->os_buf; const char *oldval = args->os_oldval.string.data; int opt_flags = args->os_flags; char *bkc = p_bkc; @@ -655,7 +655,7 @@ const char *did_set_breakat(optset_T *args FUNC_ATTR_UNUSED) /// The 'breakindentopt' option is changed. const char *did_set_breakindentopt(optset_T *args) { - win_T *win = args->os_ctx.win; + win_T *win = (win_T *)args->os_win; char **varp = (char **)args->os_varp; if (briopt_check(*varp, varp == &win->w_p_briopt ? win : NULL) == FAIL) { @@ -682,7 +682,7 @@ int expand_set_breakindentopt(optexpand_T *args, int *numMatches, char ***matche /// The 'bufhidden' option is changed. const char *did_set_bufhidden(optset_T *args) { - buf_T *buf = args->os_ctx.buf; + buf_T *buf = (buf_T *)args->os_buf; return did_set_opt_strings(buf->b_p_bh, opt_bh_values, false); } @@ -698,8 +698,8 @@ int expand_set_bufhidden(optexpand_T *args, int *numMatches, char ***matches) /// The 'buftype' option is changed. const char *did_set_buftype(optset_T *args) { - buf_T *buf = args->os_ctx.buf; - win_T *win = args->os_ctx.win; + buf_T *buf = (buf_T *)args->os_buf; + win_T *win = (win_T *)args->os_win; // When 'buftype' is set, check for valid value. if ((buf->terminal && buf->b_p_bt[0] != 't') || (!buf->terminal && buf->b_p_bt[0] == 't') @@ -780,7 +780,7 @@ static const char *did_set_global_chars_option(win_T *win, char *val, CharsOptio /// The 'fillchars' option or the 'listchars' option is changed. const char *did_set_chars_option(optset_T *args) { - win_T *win = args->os_ctx.win; + win_T *win = (win_T *)args->os_win; char **varp = (char **)args->os_varp; const char *errmsg = NULL; @@ -815,7 +815,7 @@ int expand_set_chars_option(optexpand_T *args, int *numMatches, char ***matches) /// The 'cinoptions' option is changed. const char *did_set_cinoptions(optset_T *args) { - buf_T *buf = args->os_ctx.buf; + buf_T *buf = (buf_T *)args->os_buf; // TODO(vim): recognize errors parse_cino(buf); @@ -840,7 +840,7 @@ int expand_set_clipboard(optexpand_T *args, int *numMatches, char ***matches) /// The 'colorcolumn' option is changed. const char *did_set_colorcolumn(optset_T *args) { - win_T *win = args->os_ctx.win; + win_T *win = (win_T *)args->os_win; char **varp = (char **)args->os_varp; return check_colorcolumn(*varp, varp == &win->w_p_cc ? win : NULL); } @@ -985,7 +985,7 @@ const char *did_set_completeitemalign(optset_T *args) /// The 'completeopt' option is changed. const char *did_set_completeopt(optset_T *args FUNC_ATTR_UNUSED) { - buf_T *buf = args->os_ctx.buf; + buf_T *buf = (buf_T *)args->os_buf; char *cot = p_cot; unsigned *flags = &cot_flags; @@ -1021,7 +1021,7 @@ int expand_set_completeopt(optexpand_T *args, int *numMatches, char ***matches) /// The 'completeslash' option is changed. const char *did_set_completeslash(optset_T *args) { - buf_T *buf = args->os_ctx.buf; + buf_T *buf = (buf_T *)args->os_buf; if (check_opt_strings(p_csl, opt_csl_values, false) != OK || check_opt_strings(buf->b_p_csl, opt_csl_values, false) != OK) { return e_invarg; @@ -1068,7 +1068,7 @@ int expand_set_cpoptions(optexpand_T *args, int *numMatches, char ***matches) /// The 'cursorlineopt' option is changed. const char *did_set_cursorlineopt(optset_T *args) { - win_T *win = args->os_ctx.win; + win_T *win = (win_T *)args->os_win; char **varp = (char **)args->os_varp; // This could be changed to use opt_strings_flags() instead. @@ -1176,12 +1176,12 @@ int expand_set_eadirection(optexpand_T *args, int *numMatches, char ***matches) /// options is changed. const char *did_set_encoding(optset_T *args) { - buf_T *buf = args->os_ctx.buf; + buf_T *buf = (buf_T *)args->os_buf; char **varp = (char **)args->os_varp; int opt_flags = args->os_flags; // Get the global option to compare with, otherwise we would have to check // two values for all local options. - char **gvarp = (char **)get_varp_scope_from(get_option(args->os_idx), OPT_GLOBAL, args->os_ctx); + char **gvarp = (char **)get_option_varp_scope_from(args->os_idx, OPT_GLOBAL, buf, NULL); if (gvarp == &p_fenc) { if (!MODIFIABLE(buf) && opt_flags != OPT_GLOBAL) { @@ -1246,7 +1246,7 @@ int expand_set_eventignore(optexpand_T *args, int *numMatches, char ***matches) /// The 'fileformat' option is changed. const char *did_set_fileformat(optset_T *args) { - buf_T *buf = args->os_ctx.buf; + buf_T *buf = (buf_T *)args->os_buf; char **varp = (char **)args->os_varp; const char *oldval = args->os_oldval.string.data; int opt_flags = args->os_flags; @@ -1347,7 +1347,7 @@ int expand_set_foldcolumn(optexpand_T *args, int *numMatches, char ***matches) /// The 'foldexpr' option is changed. const char *did_set_foldexpr(optset_T *args) { - win_T *win = args->os_ctx.win; + win_T *win = (win_T *)args->os_win; did_set_optexpr(args); if (foldmethodIsExpr(win)) { foldUpdateAll(win); @@ -1358,7 +1358,7 @@ const char *did_set_foldexpr(optset_T *args) /// The 'foldignore' option is changed. const char *did_set_foldignore(optset_T *args) { - win_T *win = args->os_ctx.win; + win_T *win = (win_T *)args->os_win; if (foldmethodIsIndent(win)) { foldUpdateAll(win); } @@ -1368,7 +1368,7 @@ const char *did_set_foldignore(optset_T *args) /// The 'foldmarker' option is changed. const char *did_set_foldmarker(optset_T *args) { - win_T *win = args->os_ctx.win; + win_T *win = (win_T *)args->os_win; char **varp = (char **)args->os_varp; char *p = vim_strchr(*varp, ','); @@ -1390,7 +1390,7 @@ const char *did_set_foldmarker(optset_T *args) /// The 'foldmethod' option is changed. const char *did_set_foldmethod(optset_T *args) { - win_T *win = args->os_ctx.win; + win_T *win = (win_T *)args->os_win; char **varp = (char **)args->os_varp; if (check_opt_strings(*varp, opt_fdm_values, false) != OK || **varp == NUL) { return e_invarg; @@ -1536,7 +1536,7 @@ const char *did_set_iskeyword(optset_T *args) /// changed. const char *did_set_isopt(optset_T *args) { - buf_T *buf = args->os_ctx.buf; + buf_T *buf = (buf_T *)args->os_buf; // 'isident', 'iskeyword', 'isprint' or 'isfname' option: refill g_chartab[] // If the new option is invalid, use old value. // 'lisp' option: refill g_chartab[] for '-' char @@ -1565,7 +1565,7 @@ int expand_set_jumpoptions(optexpand_T *args, int *numMatches, char ***matches) /// The 'keymap' option has changed. const char *did_set_keymap(optset_T *args) { - buf_T *buf = args->os_ctx.buf; + buf_T *buf = (buf_T *)args->os_buf; char **varp = (char **)args->os_varp; int opt_flags = args->os_flags; @@ -2053,7 +2053,7 @@ int expand_set_showcmdloc(optexpand_T *args, int *numMatches, char ***matches) /// The 'signcolumn' option is changed. const char *did_set_signcolumn(optset_T *args) { - win_T *win = args->os_ctx.win; + win_T *win = (win_T *)args->os_win; char **varp = (char **)args->os_varp; const char *oldval = args->os_oldval.string.data; if (check_signcolumn(*varp, varp == &win->w_p_scl ? win : NULL) != OK) { @@ -2079,7 +2079,7 @@ int expand_set_signcolumn(optexpand_T *args, int *numMatches, char ***matches) /// The 'spellcapcheck' option is changed. const char *did_set_spellcapcheck(optset_T *args) { - win_T *win = args->os_ctx.win; + win_T *win = (win_T *)args->os_win; // When 'spellcapcheck' is set compile the regexp program. return compile_cap_prog(win->w_s); } @@ -2113,7 +2113,7 @@ const char *did_set_spelllang(optset_T *args) /// The 'spelloptions' option is changed. const char *did_set_spelloptions(optset_T *args) { - win_T *win = args->os_ctx.win; + win_T *win = (win_T *)args->os_win; int opt_flags = args->os_flags; const char *val = args->os_newval.string.data; @@ -2189,7 +2189,7 @@ const char *did_set_statusline(optset_T *args) static const char *did_set_statustabline_rulerformat(optset_T *args, bool rulerformat, bool statuscolumn) { - win_T *win = args->os_ctx.win; + win_T *win = (win_T *)args->os_win; char **varp = (char **)args->os_varp; if (rulerformat) { // reset ru_wid first ru_wid = 0; @@ -2264,7 +2264,7 @@ const char *did_set_tabline(optset_T *args) /// The 'tagcase' option is changed. const char *did_set_tagcase(optset_T *args) { - buf_T *buf = args->os_ctx.buf; + buf_T *buf = (buf_T *)args->os_buf; int opt_flags = args->os_flags; unsigned *flags; @@ -2337,7 +2337,7 @@ const char *did_set_titlestring(optset_T *args) /// The 'varsofttabstop' option is changed. const char *did_set_varsofttabstop(optset_T *args) { - buf_T *buf = args->os_ctx.buf; + buf_T *buf = (buf_T *)args->os_buf; char **varp = (char **)args->os_varp; if (!(*varp)[0] || ((*varp)[0] == '0' && !(*varp)[1])) { @@ -2367,8 +2367,8 @@ const char *did_set_varsofttabstop(optset_T *args) /// The 'varstabstop' option is changed. const char *did_set_vartabstop(optset_T *args) { - buf_T *buf = args->os_ctx.buf; - win_T *win = args->os_ctx.win; + buf_T *buf = (buf_T *)args->os_buf; + win_T *win = (win_T *)args->os_win; char **varp = (char **)args->os_varp; if (!(*varp)[0] || ((*varp)[0] == '0' && !(*varp)[1])) { @@ -2417,7 +2417,7 @@ const char *did_set_viewoptions(optset_T *args FUNC_ATTR_UNUSED) /// The 'virtualedit' option is changed. const char *did_set_virtualedit(optset_T *args) { - win_T *win = args->os_ctx.win; + win_T *win = (win_T *)args->os_win; char *ve = p_ve; unsigned *flags = &ve_flags; @@ -2527,7 +2527,7 @@ const char *did_set_winbar(optset_T *args) /// The 'winhighlight' option is changed. const char *did_set_winhighlight(optset_T *args) { - win_T *win = args->os_ctx.win; + win_T *win = (win_T *)args->os_win; char **varp = (char **)args->os_varp; if (!parse_winhl_opt(*varp, varp == &win->w_p_winhl ? win : NULL)) { return e_invarg; |