Signed-off-by: lovechinamo <wangdongqi2@huawei.com>

Changes to be committed:
	modified:   frameworks/inputmethod_controller/src/input_method_controller.cpp
This commit is contained in:
lovechinamo
2022-06-16 19:49:38 +08:00
parent f65e2b80e3
commit 83d7f0b707
@@ -386,7 +386,7 @@ using namespace MessageID;
{
IMSA_HILOGI("InputMethodController::GetTextBeforeCursor");
if (!mTextString.empty()) {
int32_t endPos = (mSelectNewEnd+number < static_cast<int32_t>(mTextString.size())) ? \
int32_t endPos = (mSelectNewEnd+number < static_cast<int32_t>(mTextString.size())) ?
(mSelectNewEnd + number) : mTextString.size();
return mTextString.substr(mSelectNewEnd, endPos);
}