From e8918378f56190a664319b2bd918f3223e70a577 Mon Sep 17 00:00:00 2001 From: Agnelo Vaz Date: Thu, 11 Sep 2014 17:05:19 +0100 Subject: [PATCH] (TextInput) Allow whitespace to be considered a word when using cut and paste Change-Id: If2357e20d46c87ba3ce27ade944b7a9b973b4802 Signed-off-by: Agnelo Vaz --- base/dali-toolkit/internal/builder/builder-impl.cpp | 1 - base/dali-toolkit/internal/controls/text-view/text-processor.cpp | 9 +++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/base/dali-toolkit/internal/builder/builder-impl.cpp b/base/dali-toolkit/internal/builder/builder-impl.cpp index f6af80e..ee8f8fc 100644 --- a/base/dali-toolkit/internal/builder/builder-impl.cpp +++ b/base/dali-toolkit/internal/builder/builder-impl.cpp @@ -1010,7 +1010,6 @@ bool Builder::ApplyStyle( const std::string& styleName, Handle& handle, const Re } else { - DALI_SCRIPT_WARNING("No styles section to create style '%s'\n", styleName.c_str()); return false; } } diff --git a/base/dali-toolkit/internal/controls/text-view/text-processor.cpp b/base/dali-toolkit/internal/controls/text-view/text-processor.cpp index f374479..1f32dd9 100644 --- a/base/dali-toolkit/internal/controls/text-view/text-processor.cpp +++ b/base/dali-toolkit/internal/controls/text-view/text-processor.cpp @@ -327,6 +327,15 @@ void FindNearestWord( const MarkupProcessor::StyledTextArray& text, size_t offse j++; } + // If both markers at same position and is whitespace then word is a whitespace word + if ( i == j ) + { + while(j < size && IsWhiteSpace(text, j)) + { + j++; + } + } + start = i; end = j; } -- 2.7.4