fix: 修复空码回溯功能

This commit is contained in:
amzxyz
2026-01-30 21:11:40 +08:00
parent 937e7bbf61
commit d971547cf9
2 changed files with 5 additions and 5 deletions

View File

@@ -7250,7 +7250,7 @@ bittorrent bittorrent
bitty bitty
bitumen bitumen
bituminous bituminous
bitwarden bitwarden
Bitwarden Bitwarden
bitwise bitwise
bivalent bivalent
bivalve bivalve
@@ -26962,7 +26962,7 @@ gels gels
gem gem
gemara gemara
geminate geminate
Gemini Gemini
gemini gemini
Geminid Geminid
Gemma Gemma
gemmiparous gemmiparous

View File

@@ -368,7 +368,7 @@ function F.func(input, env)
local good_cand = restore_sentence_spacing(cand, env.split_pattern, env.delim_check_pattern)
local fmt_cand = apply_formatting(good_cand, code_ctx)
-- [恢复] 去除注释中的太极符号
-- 去除注释中的太极符号
if fmt_cand.comment and find(fmt_cand.comment, "\226\152\175") then
local nc = Candidate(fmt_cand.type, fmt_cand.start, fmt_cand._end, fmt_cand.text, "")
nc.preedit = fmt_cand.preedit
@@ -400,7 +400,7 @@ function F.func(input, env)
if not best_candidate_saved and cand.comment ~= "~" and not env.block_derivation then
env.memory[curr_input] = {
text = fmt_cand.text,
preedit = fmt_cand.preedit or curr_input
preedit = curr_input
}
best_candidate_saved = true
end
@@ -421,7 +421,7 @@ function F.func(input, env)
if not best_candidate_saved and cand.comment ~= "~" and not env.block_derivation then
env.memory[curr_input] = {
text = fmt_cand.text,
preedit = fmt_cand.preedit or curr_input
preedit = curr_input
}
best_candidate_saved = true
end