]> git.ktnx.net Git - mobile-ledger.git/commitdiff
fix marking of unmatched part at the end of the test text
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 13 Feb 2021 21:38:36 +0000 (23:38 +0200)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Thu, 18 Feb 2021 07:19:43 +0000 (07:19 +0000)
app/src/main/java/net/ktnx/mobileledger/model/TemplateDetailsItem.java

index 7dfed8989b5fb040974c58b0137b27a6bfe2ceb9..0f9cfe490b84e00f8053cb3b35947c49a5196c5f 100644 (file)
@@ -658,7 +658,7 @@ abstract public class TemplateDetailsItem {
                                 ss.setSpan(notMatchedSpan(), 0, m.start(),
                                         Spanned.SPAN_INCLUSIVE_INCLUSIVE);
                             if (m.end() < testText.length() - 1)
-                                ss.setSpan(notMatchedSpan(), m.end(), testText.length() - 1,
+                                ss.setSpan(notMatchedSpan(), m.end(), testText.length(),
                                         Spanned.SPAN_INCLUSIVE_INCLUSIVE);
 
                             ss.setSpan(matchedSpan(), m.start(0), m.end(0),