Skip to content

Commit

Permalink
fixed: cursor position error when preedit_type set preview.
Browse files Browse the repository at this point in the history
  • Loading branch information
fxliang committed Jul 27, 2023
1 parent 60c1bcb commit e6619ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion RimeWithWeasel/RimeWithWeasel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ bool RimeWithWeaselHandler::_Respond(UINT session_id, EatLine eat)
messages.push_back(std::string("ctx.preedit.cursor=") +
std::to_string(utf8towcslen(first.c_str(), 0)) + ',' +
std::to_string(utf8towcslen(first.c_str(), first.size())) + ',' +
std::to_string(utf8towcslen(first.c_str(), ctx.composition.cursor_pos)) + '\n');
std::to_string(utf8towcslen(first.c_str(), first.size())) + '\n');
break;
}
// no preview, fall back to composition
Expand Down

0 comments on commit e6619ea

Please sign in to comment.