OSDN Git Service

choose boundary reason based on the previous/next char only QTextBoundaryFinder:...
authorIvailo Monev <xakepa10@gmail.com>
Sat, 10 Jun 2023 08:42:35 +0000 (11:42 +0300)
committerIvailo Monev <xakepa10@gmail.com>
Sat, 10 Jun 2023 08:43:42 +0000 (11:43 +0300)
the start and end of the text were considered as boundaries for compat only

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/core/tools/qtextboundaryfinder.cpp

index ced110f..0ad7249 100644 (file)
@@ -352,10 +352,6 @@ QTextBoundaryFinder::BoundaryReasons QTextBoundaryFinder::boundaryReasons() cons
 {
     if (!isAtBoundary()) {
         return QTextBoundaryFinder::NotAtBoundary;
-    } else if (d->pos == 0) {
-        return QTextBoundaryFinder::StartWord;
-    } else if (d->pos == d->string.size()) {
-        return QTextBoundaryFinder::EndWord;
     }
 
     QTextBoundaryFinder::BoundaryReasons reasons;