vim-patch:8.1.1966: some code in options.c fits better elsewhere (#19840)

Problem:    Some code in options.c fits better elsewhere.
Solution:   Move functions from options.c to other files. (Yegappan
            Lakshmanan, closes vim/vim#4889)
e677df8d93
This commit is contained in:
zeertzjq
2022-08-19 19:20:39 +08:00
committed by GitHub
parent 5dc43265b1
commit 2af9be3db5
13 changed files with 951 additions and 941 deletions

View File

@@ -5195,29 +5195,6 @@ linenr_T tv_get_lnum_buf(const typval_T *const tv, const buf_T *const buf)
return (linenr_T)tv_get_number_chk(tv, NULL);
}
void get_qf_loc_list(int is_qf, win_T *wp, typval_T *what_arg, typval_T *rettv)
{
if (what_arg->v_type == VAR_UNKNOWN) {
tv_list_alloc_ret(rettv, kListLenMayKnow);
if (is_qf || wp != NULL) {
(void)get_errorlist(NULL, wp, -1, 0, rettv->vval.v_list);
}
} else {
tv_dict_alloc_ret(rettv);
if (is_qf || wp != NULL) {
if (what_arg->v_type == VAR_DICT) {
dict_T *d = what_arg->vval.v_dict;
if (d != NULL) {
qf_get_properties(wp, d, rettv->vval.v_dict);
}
} else {
emsg(_(e_dictreq));
}
}
}
}
/// @return information (variables, options, etc.) about a tab page
/// as a dictionary.
dict_T *get_tabpage_info(tabpage_T *tp, int tp_idx)