File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed
src/main/java/com/santalu/textmatcher Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ allprojects {
100100
101101```
102102dependencies {
103- implementation 'com.github.santalu:textmatcher:1.0.5 '
103+ implementation 'com.github.santalu:textmatcher:1.0.6 '
104104}
105105```
106106## License
Original file line number Diff line number Diff line change @@ -8,8 +8,8 @@ android {
88 defaultConfig {
99 minSdkVersion versions. minSdk
1010 targetSdkVersion versions. targetSdk
11- versionCode 6
12- versionName " 1.0.5 "
11+ versionCode 7
12+ versionName " 1.0.6 "
1313 consumerProguardFiles ' consumer-rules.pro'
1414 }
1515
Original file line number Diff line number Diff line change @@ -33,9 +33,12 @@ class TextMatcher(
3333 if (! isMatchingEnabled) return
3434
3535 rules.forEach {
36- if (text.isNullOrEmpty()) return @forEach action(it, null )
36+ if (text.isNullOrEmpty()) {
37+ action(it, null )
38+ return @forEach
39+ }
3740
38- val position = if (before > count) start - 1 else start
41+ val position = if (start > 0 && before > count) start - 1 else start
3942
4043 // find closest target's boundaries from selection
4144 val targetStart = it.getTargetStart(text, position)
You can’t perform that action at this time.
0 commit comments