diff src/insexpand.c @ 20392:4c317d8c1051 v8.2.0751

patch 8.2.0751: Vim9: performance can be improved Commit: https://github.com/vim/vim/commit/7e9f351b2e69b498c4ee5004d7459844e1ba191a Author: Bram Moolenaar <Bram@vim.org> Date: Wed May 13 22:44:22 2020 +0200 patch 8.2.0751: Vim9: performance can be improved Problem: Vim9: performance can be improved. Solution: Don't call break. Inline check for list materialize. Make an inline version of ga_grow().
author Bram Moolenaar <Bram@vim.org>
date Wed, 13 May 2020 22:45:04 +0200
parents 06a1dd50463e
children 9064044fd4f6
line wrap: on
line diff
--- a/src/insexpand.c
+++ b/src/insexpand.c
@@ -2334,7 +2334,7 @@ ins_compl_add_list(list_T *list)
     int		dir = compl_direction;
 
     // Go through the List with matches and add each of them.
-    range_list_materialize(list);
+    CHECK_LIST_MATERIALIZE(list);
     FOR_ALL_LIST_ITEMS(list, li)
     {
 	if (ins_compl_add_tv(&li->li_tv, dir) == OK)
@@ -2519,7 +2519,7 @@ get_complete_info(list_T *what_list, dic
     else
     {
 	what_flag = 0;
-	range_list_materialize(what_list);
+	CHECK_LIST_MATERIALIZE(what_list);
 	FOR_ALL_LIST_ITEMS(what_list, item)
 	{
 	    char_u *what = tv_get_string(&item->li_tv);