From 662614238d4cabb4f2ffec79395dbb73e53406dc Mon Sep 17 00:00:00 2001 From: amzxyz Date: Thu, 22 Jan 2026 22:29:26 +0800 Subject: [PATCH] =?UTF-8?q?fix(tips):=20=E7=BF=BB=E9=A1=B5=E5=90=8E?= =?UTF-8?q?=E4=B8=8D=E5=86=8D=E5=8C=B9=E9=85=8D=E8=BE=93=E5=85=A5=E7=BC=96?= =?UTF-8?q?=E7=A0=81=EF=BC=8C=E9=87=8A=E6=94=BE=E7=BF=BB=E9=A1=B5=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E6=8C=89=E9=94=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/super_tips.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lua/super_tips.lua b/lua/super_tips.lua index 998aa7a..e31957c 100644 --- a/lua/super_tips.lua +++ b/lua/super_tips.lua @@ -150,10 +150,14 @@ local function update_tips_prompt(context, env) if not segment then return end local cand = context:get_selected_candidate() or {} - - if segment.selected_index == 0 then + + local page_size = env.engine.schema.page_size + -- 只要在第一页,都支持编码匹配,且翻页后失效 + if segment.selected_index < page_size then + -- 在第一页:同时尝试匹配 [编码] 和 [候选词] env.current_tip = tips.get_tip({ context.input, cand.text }) else + -- 翻页后只匹配 [候选词] env.current_tip = tips.get_tip(cand.text) end