fix(candwnd): measure and size candidate wrap at 600 DIP
Force wrap-aware measure, serialize FineTune after measure content updates, and preserve flip-up host height via MarginTop. feat: lazily load single-letter Pinyin candidates - query the top 24 single-letter candidates from the database - load the complete candidate list on the first page-down action - apply the same behavior to Shuangpin and Quanpin - resolve Shuangpin initials according to the active profile - preserve candidate frequency adjustment and pinning - disable deletion for single-letter candidates - add regression tests for Shuangpin v-to-zh mapping and lazy expansion
This commit is contained in:
1 parent
e2af2c49d2
commit
02d5a3ff37
13 files changed
+199
-49
No files matched your search
@@ -169,6 +169,11 @@ const std::vector<IInputSession::WordItem> &EngineInputSession::get_candidates()
|
||||
return session_.get_candidates();
|
||||
}
|
||||
|
||||
bool EngineInputSession::expand_initial_candidates()
|
||||
{
|
||||
return session_.expand_initial_candidates();
|
||||
}
|
||||
|
||||
const QueryRequest &EngineInputSession::request() const
|
||||
{
|
||||
return session_.get_request();
|
||||
@@ -276,6 +281,10 @@ int EngineInputSession::pin_candidate(std::string pinyin, std::string word)
|
||||
|
||||
int EngineInputSession::remove_candidate(std::string pinyin, std::string word)
|
||||
{
|
||||
if (!is_wubi() && remove_delimiters(request().raw_input).size() == 1)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return session_.delete_by_pinyin_and_word(std::move(pinyin), std::move(word));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user