Current logic does not send text and cursor position for initial white space to IME.
I don't know the exact history of this logic.
But in case of efl, it is sending information about initial white space to IME.
Change behavior for consistency.
Change-Id: I86bc7ecfece9f02c2eb670c3359efc31d79daabb
Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
std::string text;
CharacterIndex cursorPosition = 0u;
- Length numberOfWhiteSpaces = 0u;
if(retrieveCursor)
{
- numberOfWhiteSpaces = controller.mImpl->GetNumberOfWhiteSpaces(0u);
-
cursorPosition = controller.mImpl->GetLogicalCursorPosition();
-
- if(cursorPosition < numberOfWhiteSpaces)
- {
- cursorPosition = 0u;
- }
- else
- {
- cursorPosition -= numberOfWhiteSpaces;
- }
}
if(retrieveText)
if(!controller.mImpl->IsShowingPlaceholderText())
{
// Retrieves the normal text string.
- controller.mImpl->GetText(numberOfWhiteSpaces, text);
+ controller.mImpl->GetText(0u, text);
}
else
{
if(mEventData && mEventData->mInputMethodContext)
{
CharacterIndex cursorPosition = GetLogicalCursorPosition();
-
- const Length numberOfWhiteSpaces = GetNumberOfWhiteSpaces(0u);
-
- // Update the cursor position by removing the initial white spaces.
- if(cursorPosition < numberOfWhiteSpaces)
- {
- cursorPosition = 0u;
- }
- else
- {
- cursorPosition -= numberOfWhiteSpaces;
- }
-
mEventData->mInputMethodContext.SetCursorPosition(cursorPosition);
mEventData->mInputMethodContext.NotifyCursorPosition();
}