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().
This commit is contained in:
glepnir 2026-07-29 18:51:44 +08:00 committed by GitHub
parent 7b7a21bd2a
commit 182b02afb0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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