Skip to content
Commit 55a8d72e authored by Xuetian Weng's avatar Xuetian Weng
Browse files

Use heuristic weighted length algorithm to calculate the query term length.

Summary:
Composing CJK character requires a lot more key comparing to latin
characters. The raw length check does not make much sense for query string
in CJK characters. Here we use a simple algorithm to query the character
script property in unicode. If they are belong to CJK, use length 2 instead
of 1 for the character.

Test Plan:
Search "系" (normally requires three key press "x + i + 1" under pinyin) under
zh_CN in krunner and get some result instead of nothing.

Reviewers: hein, broulik

Reviewed By: hein

Subscribers: cfeck, ihipop, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D8771
parent b40c0de0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment