vim-patch:8.2.4483: command completion makes two rounds to collect matches (#21857)

Problem:    Command completion makes two rounds to collect matches.
Solution:   Use a growarray to collect matches. (Yegappan Lakshmanan,
            closes vim/vim#9860)

5de4c4372d

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
This commit is contained in:
zeertzjq
2023-01-17 19:52:02 +08:00
committed by GitHub
parent ddd69a6c81
commit 132f001ce8
5 changed files with 194 additions and 189 deletions

View File

@@ -27,7 +27,8 @@ typedef struct growarray {
#define GA_APPEND(item_type, gap, item) \
do { \
ga_grow(gap, 1); \
((item_type *)(gap)->ga_data)[(gap)->ga_len++] = (item); \
((item_type *)(gap)->ga_data)[(gap)->ga_len] = (item); \
(gap)->ga_len++; \
} while (0)
#define GA_APPEND_VIA_PTR(item_type, gap) \