From a2b22535e82aae63072fffd303b783597baf9ebc Mon Sep 17 00:00:00 2001 From: lovechinamo Date: Thu, 16 Jun 2022 20:47:47 +0800 Subject: [PATCH] Signed-off-by: lovechinamo Changes to be committed: --- .idea/.gitignore | 0 .idea/miscservices_inputmethod_1.iml | 8 +++ .idea/modules.xml | 8 +++ .idea/vcs.xml | 6 +++ .idea/workspace.xml | 54 +++++++++++++++++++ .../src/input_method_controller.cpp | 5 +- 6 files changed, 79 insertions(+), 2 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/miscservices_inputmethod_1.iml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 .idea/workspace.xml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/.idea/miscservices_inputmethod_1.iml b/.idea/miscservices_inputmethod_1.iml new file mode 100644 index 0000000..bc2cd87 --- /dev/null +++ b/.idea/miscservices_inputmethod_1.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..2add3f4 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..e13c448 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + { + "keyToString": { + "RunOnceActivity.OpenProjectViewOnStart": "true", + "RunOnceActivity.ShowReadmeOnStart": "true", + "RunOnceActivity.cidr.known.project.marker": "true", + "WebServerToolWindowFactoryState": "false", + "cf.first.check.clang-format": "false", + "cidr.known.project.marker": "true" + } +} + + + + + 1655383172519 + + + + \ No newline at end of file diff --git a/frameworks/inputmethod_controller/src/input_method_controller.cpp b/frameworks/inputmethod_controller/src/input_method_controller.cpp index 0e448ec..53adcf5 100644 --- a/frameworks/inputmethod_controller/src/input_method_controller.cpp +++ b/frameworks/inputmethod_controller/src/input_method_controller.cpp @@ -386,8 +386,9 @@ 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"";