From fcf4bef63b317395a60ccf9fdcd3d2dbf3ea2bf8 Mon Sep 17 00:00:00 2001 From: amzxyz Date: Sun, 4 Jan 2026 20:29:50 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=8F=A5=E4=B8=AD?= =?UTF-8?q?=E5=8F=8D=E6=9F=A5=E5=AF=B9=E5=8F=8C=E6=8B=BC=E7=BC=96=E7=A0=81?= =?UTF-8?q?=E7=9A=84=E6=8F=90=E5=8F=96=E7=AD=96=E7=95=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/auto_phrase.lua | 2 +- lua/super_lookup.lua | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lua/auto_phrase.lua b/lua/auto_phrase.lua index 7cf7dd1..d1cef4c 100644 --- a/lua/auto_phrase.lua +++ b/lua/auto_phrase.lua @@ -66,7 +66,7 @@ function AP.init(env) end -- 英文:enuser(不受 add_* 开关影响,始终尝试启用) - env.en_memory = Memory(env.engine, env.engine.schema, "wanxiang_mixedcode") + env.en_memory = Memory(env.engine, env.engine.schema, "wanxiang_english") -- 只要有一边需要,就挂上 commit/delete 通知 if env.en_memory or env.memory then diff --git a/lua/super_lookup.lua b/lua/super_lookup.lua index 3f6cbff..842a964 100644 --- a/lua/super_lookup.lua +++ b/lua/super_lookup.lua @@ -74,12 +74,17 @@ local function expand_code_variant(main_projection, xlit_projection, part) end -- 3. 遍历所有种子(原始编码 + 缩写编码),统一进行规则投影 for _, code in ipairs(seeds) do - -- 应用 main_projection (非大写) + -- A. 应用 main_projection if main_projection then local p = main_projection:apply(code, true) - if p and #p > 0 then add(p) end + if p and #p > 0 then + add(p) + if #p == 4 then + add(p:sub(1,1) .. p:sub(3,3)) + end + end end - -- 应用 xlit_projection (大写笔画,不参与前面重复计算) + -- B. 应用 xlit_projection if code:match('^%u+$') and xlit_projection then local xlit_result = xlit_projection:apply(code, true) if xlit_result and #xlit_result > 0 then add(xlit_result) end