You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更说明
添加了移动候选框中的光标的能力支持
这个能力包括两个新功能:
根据光标位置重算候选,在按下确认键时“只将光标前的内容上屏,后面的内容保留”的能力;
把
Tab / Shift+Tab配成音节跳转后,按 Tab 会跳到下一个分词位置(不论该分词位置是自动切分还是手敲的分词符),找不到就到输入末尾。光标已经在末尾时,就从开头重新找一次,比如ni'hao|会跳到ni'|hao,ni'|则停在原处。Shift+Tab 对应SyllablePrev,向左找前一个分词边界。有切分但左边没有边界时跳到开头,整串没有可用切分时向左移一个编码字符。这个功能的应用场景:
假设用户键入了一长串的短语,然后输入法预测的第一个词出错了。此时用户为了选中第一个正确的词,不得不往后翻非常多页,直到进入了单字候选部分才能选到自己需要的词。
我是小鹤双拼的使用者;五笔等码表方案通常逐字或逐词输入,全拼和双拼更常连打多个音节,因此也更容易遇到需要回头分段选词的情况。我个人是从初中学打字的时候开始就在频繁使用这两个功能了。
其他竞品的同功能支持调研情况:
风险点:
wind_input\crates\wind-coordinator\src\coordinator\message_handler.rs:2219),但看起来这段注释是agent写的,不清楚这是否是特意为之?所以还是保留了旧逻辑,光标移动是否重算候选被解耦为和“跳转至下一个分词符位置”无关的单独设置,默认关闭即保留原逻辑。和我新增的跳转快捷键一起放在设置的“按键”-“候选操作”里。变更类型
相关 Issue
相关讨论 #234。
配套设置界面 PR:huanfeng/wind-setting#2。
测试情况
在 Windows 11 开发版中手动验证分段上屏和 Tab 循环跳转。协调器的 11 项回归测试通过,覆盖全拼、双拼、五笔及五笔拼音混输。核心与设置界面的 3 项配置契约测试通过。Windows 本地格式检查和 Clippy 已通过,工作区全量测试已停止,完整检查以 GitHub Actions 的结果为准。
检查清单
cargo fmt格式化(逻辑修改与 fmt 修改分开提交)AGENTS.md