From f65e2b80e33e6f2553e64d44a708d3046fecbd5b Mon Sep 17 00:00:00 2001 From: lovechinamo Date: Thu, 16 Jun 2022 09:00:22 +0800 Subject: [PATCH] Signed-off-by: lovechinamo Changes to be committed: --- .../inputmethod_controller/src/input_method_controller.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frameworks/inputmethod_controller/src/input_method_controller.cpp b/frameworks/inputmethod_controller/src/input_method_controller.cpp index 81cce85..8e9811b 100644 --- a/frameworks/inputmethod_controller/src/input_method_controller.cpp +++ b/frameworks/inputmethod_controller/src/input_method_controller.cpp @@ -386,7 +386,8 @@ using namespace MessageID; { IMSA_HILOGI("InputMethodController::GetTextBeforeCursor"); if (!mTextString.empty()) { - int32_t endPos = (mSelectNewEnd+number < static_cast(mTextString.size())) ? (mSelectNewEnd + number) : mTextString.size(); + int32_t endPos = (mSelectNewEnd+number < static_cast(mTextString.size())) ? \ + (mSelectNewEnd + number) : mTextString.size(); return mTextString.substr(mSelectNewEnd, endPos); } return u"";