diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-12-23 18:17:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-23 18:17:01 +0100 |
commit | dee78a4095a27369e428572f74f7b64bcc5f670e (patch) | |
tree | 4f06de0fd7a5a80d746c2ffaf18cb0719e66cccd /src/nvim/edit.c | |
parent | ec86f4215fc58246998c6017df84206153d0df1a (diff) | |
parent | 5cb7a709e7f60b0e7bcde70a1aa9fea5f060fe0f (diff) | |
download | rneovim-dee78a4095a27369e428572f74f7b64bcc5f670e.tar.gz rneovim-dee78a4095a27369e428572f74f7b64bcc5f670e.tar.bz2 rneovim-dee78a4095a27369e428572f74f7b64bcc5f670e.zip |
Merge #7708 from ZyX-I/hide-container-impl
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 4f0a3eaf34..649357c7ea 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; - } + } + }); } /* |