From 569e42fc4e8d27686ffd59d5ec89b36b04252120 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9C=9F=E7=99=BD?= Date: Mon, 23 Dec 2024 09:15:31 +0000 Subject: [PATCH] update src/spellfile.c. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 真白 --- src/spellfile.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/spellfile.c b/src/spellfile.c index 24df042..7a3b776 100644 --- a/src/spellfile.c +++ b/src/spellfile.c @@ -6216,6 +6216,12 @@ spell_add_word( int i; char_u *spf; + if (enc_utf8 && !utf_valid_string(word, NULL)) + { + emsg(_(e_illegal_character_in_word)); + return; + } + if (!valid_spell_word(word, word + len)) { emsg(_(e_illegal_character_in_word)); -- Gitee