mirror of
https://github.com/neovim/neovim.git
synced 2025-10-01 15:38:33 +00:00
*: Hide list implementation in other files as well
This commit is contained in:
@@ -3213,26 +3213,25 @@ spell_find_suggest (
|
||||
// Find suggestions by evaluating expression "expr".
|
||||
static void spell_suggest_expr(suginfo_T *su, char_u *expr)
|
||||
{
|
||||
list_T *list;
|
||||
listitem_T *li;
|
||||
int score;
|
||||
const char *p;
|
||||
|
||||
// The work is split up in a few parts to avoid having to export
|
||||
// suginfo_T.
|
||||
// First evaluate the expression and get the resulting list.
|
||||
list = eval_spell_expr(su->su_badword, expr);
|
||||
list_T *const list = eval_spell_expr(su->su_badword, expr);
|
||||
if (list != NULL) {
|
||||
// Loop over the items in the list.
|
||||
for (li = list->lv_first; li != NULL; li = li->li_next)
|
||||
if (li->li_tv.v_type == VAR_LIST) {
|
||||
TV_LIST_ITER(list, li, {
|
||||
if (TV_LIST_ITEM_TV(li)->v_type == VAR_LIST) {
|
||||
// Get the word and the score from the items.
|
||||
score = get_spellword(li->li_tv.vval.v_list, &p);
|
||||
score = get_spellword(TV_LIST_ITEM_TV(li)->vval.v_list, &p);
|
||||
if (score >= 0 && score <= su->su_maxscore) {
|
||||
add_suggestion(su, &su->su_ga, (const char_u *)p, su->su_badlen,
|
||||
score, 0, true, su->su_sallang, false);
|
||||
}
|
||||
}
|
||||
});
|
||||
tv_list_unref(list);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user