aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/match.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/match.c b/src/nvim/match.c
index 54f3bff472..4bfc06d7e5 100644
--- a/src/nvim/match.c
+++ b/src/nvim/match.c
@@ -873,11 +873,11 @@ void f_getmatches(typval_T *argvars, typval_T *rettv, FunPtr fptr)
int i;
win_T *win = get_optional_window(argvars, 0);
+ tv_list_alloc_ret(rettv, kListLenMayKnow);
if (win == NULL) {
return;
}
- tv_list_alloc_ret(rettv, kListLenMayKnow);
cur = win->w_match_head;
while (cur != NULL) {
dict_T *dict = tv_dict_alloc();