X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Ftext-controller-impl-event-handler.cpp;h=1ed8c7f1144dee4f9dbc6ac5af58cbfc1b791a62;hp=cee6a8800ff3980e11c5966f726d9a98d025c718;hb=6a219d0bbcfd016e24b5466d5fb1a666c92feae5;hpb=b7e3a56ad86f6f45b9cd126647a6161757c3674e diff --git a/dali-toolkit/internal/text/text-controller-impl-event-handler.cpp b/dali-toolkit/internal/text/text-controller-impl-event-handler.cpp index cee6a88..1ed8c7f 100644 --- a/dali-toolkit/internal/text/text-controller-impl-event-handler.cpp +++ b/dali-toolkit/internal/text/text-controller-impl-event-handler.cpp @@ -379,14 +379,15 @@ void ControllerImplEventHandler::OnCursorKeyEvent(Controller::Impl& impl, const impl.GetCursorPosition(primaryCursorPosition, cursorInfo); // Get the line below. - const LineRun& line = *(visualModel->mLines.Begin() + lineIndex + 1u); + const LineRun& nextline = *(visualModel->mLines.Begin() + lineIndex + 1u); + const LineRun& currline = *(visualModel->mLines.Begin() + lineIndex); // Get last line index const LineIndex lastLineIndex = (visualModel->mLines.Size() > 0 ? visualModel->mLines.Size() - 1u : 0); const bool isLastLine = (lineIndex + 1u == lastLineIndex); // Get the next hit 'y' point. - const float hitPointY = cursorInfo.lineOffset + cursorInfo.lineHeight + 0.5f * GetLineHeight(line, isLastLine); + const float hitPointY = cursorInfo.lineOffset + GetLineHeight(currline, false) + 0.5f * GetLineHeight(nextline, isLastLine); // Use the cursor hook position 'x' and the next hit 'y' position to calculate the new cursor index. bool matchedCharacter = false;