fix: 混合编码候选下-空出简状态下,也能出现简码

This commit is contained in:
amzxyz
2026-01-30 14:16:35 +08:00
parent c200321cf4
commit 48798e2b86
3 changed files with 14 additions and 144 deletions

View File

@@ -535,7 +535,11 @@ function M.func(input, env)
if cand_count == 1 then
-- 判断是否为"空码" (raw / english / 纯字母 / 文本等于输入)
local is_empty = (cand.type == "raw" or cand.type == "english" or cand.text == input_code or not string.find(cand.text, "[^a-zA-Z]"))
local has_letter = string.find(cand.text, "[a-zA-Z]")
local is_empty = (cand.type == "raw"
or cand.type == "english"
or cand.text == input_code
or has_letter) -- 只要包含字母,就算作空
try_trigger_abbrev(is_empty)
end