From 182b02afb0402c0473323106ed883cb9a9feb75c Mon Sep 17 00:00:00 2001 From: glepnir Date: Wed, 29 Jul 2026 18:51:44 +0800 Subject: [PATCH] fix(insexpand): use String cleanup for compl_leader (#41044) Problem: compl_leader is a String, but it is cleared with XFREE_CLEAR(). Solution: Replace XFREE_CLEAR() with API_CLEAR_STRING(). --- src/nvim/insexpand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nvim/insexpand.c b/src/nvim/insexpand.c index 6750e9b763..0fb48f2a8f 100644 --- a/src/nvim/insexpand.c +++ b/src/nvim/insexpand.c @@ -1597,7 +1597,7 @@ static int ins_compl_build_pum(void) // If it's user complete function and refresh_always, // do not use "compl_leader" as prefix filter. if (ins_compl_need_restart()) { - XFREE_CLEAR(compl_leader); + API_CLEAR_STRING(compl_leader); } bool compl_no_select = (get_cot_flags() & kOptCotFlagNoselect) != 0