Skip to content

Commit

Permalink
feat(tsf): fix candidate selecting in preview preedit mode
Browse files Browse the repository at this point in the history
  • Loading branch information
nameoverflow committed Feb 25, 2018
1 parent f76379b commit 206efd6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion RimeWithWeasel/RimeWithWeasel.cpp
Expand Up @@ -463,7 +463,7 @@ bool RimeWithWeaselHandler::_Respond(UINT session_id, EatLine eat)
case weasel::PREVIEW:
if (ctx.menu.num_candidates > 0)
{
std::string first = ctx.menu.candidates[0].text;
std::string first = ctx.menu.candidates[ctx.menu.highlighted_candidate_index].text;
messages.push_back(std::string("ctx.preedit=") + first + '\n');
messages.push_back(std::string("ctx.preedit.cursor=") +
std::to_string(utf8towcslen(first.c_str(), 0)) + ',' +
Expand Down

0 comments on commit 206efd6

Please sign in to comment.