diff --git a/src/RichText/TextBox.cpp b/src/RichText/TextBox.cpp index c9c8d1a..03e5771 100644 --- a/src/RichText/TextBox.cpp +++ b/src/RichText/TextBox.cpp @@ -759,6 +759,16 @@ TextPosition TextBox::move(Movement movement, TextPosition pos, std::optionalisWhitespace(u)) + return pos; + } + std::string fullText = get_string(); size_t bytePosInFullText = get_byte_pos_from_text_pos(pos); @@ -776,7 +786,7 @@ TextPosition TextBox::move(Movement movement, TextPosition pos, std::optionalisWhitespace(u) || movement == Movement::LEFT_WORD_TIGHT) + if(!SkUnicodes::ICU::Make()->isWhitespace(u)) byteIndexToRet = nextByteIndex; } break; @@ -787,6 +797,16 @@ TextPosition TextBox::move(Movement movement, TextPosition pos, std::optionalisWhitespace(u)) + return pos; + } + std::string fullText = get_string(); size_t bytePosInFullText = get_byte_pos_from_text_pos(pos);