diff options
author | ZyX <kp-pav@yandex.ru> | 2017-12-10 22:04:43 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-12-10 22:04:43 +0300 |
commit | ac4bbf55f6d6b9b252dd90fe800626850022b690 (patch) | |
tree | 41535a05962e9c04bb2d955abebc61aa87ca2bca /src/nvim/edit.c | |
parent | 5c1ddb5078c90f69c7225a7b2e74ccb914dcdd6a (diff) | |
download | rneovim-ac4bbf55f6d6b9b252dd90fe800626850022b690.tar.gz rneovim-ac4bbf55f6d6b9b252dd90fe800626850022b690.tar.bz2 rneovim-ac4bbf55f6d6b9b252dd90fe800626850022b690.zip |
*: Hide list implementation in other files as well
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r-- | src/nvim/edit.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c index 859f98d2ad..2fa4a52387 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -3536,19 +3536,19 @@ theend: /* * Add completions from a list. */ -static void ins_compl_add_list(list_T *list) +static void ins_compl_add_list(list_T *const list) { - listitem_T *li; int dir = compl_direction; - /* Go through the List with matches and add each of them. */ - for (li = list->lv_first; li != NULL; li = li->li_next) { - if (ins_compl_add_tv(&li->li_tv, dir) == OK) - /* if dir was BACKWARD then honor it just once */ + // Go through the List with matches and add each of them. + TV_LIST_ITER(list, li, { + if (ins_compl_add_tv(TV_LIST_ITEM_TV(li), dir) == OK) { + // If dir was BACKWARD then honor it just once. dir = FORWARD; - else if (did_emsg) + } else if (did_emsg) { break; - } + } + }); } /* |