Skip to content

Commit 0b0a07d

Browse files
committed
Fixes a lint error for mixing int & float using contains method
1 parent fc6eb05 commit 0b0a07d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

aztec/src/main/kotlin/org/wordpress/aztec/EnhancedMovementMethod.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ object EnhancedMovementMethod : ArrowKeyMovementMethod() {
4646
layout.getLineBounds(line, lineRect)
4747

4848
val clickedWithinLineHeight = y >= lineRect.top && y <= lineRect.bottom
49-
val clickedOnSpanToTheLeftOfCursor = x in charPrevX..charX
50-
val clickedOnSpanToTheRightOfCursor = x in charX..charNextX
49+
val clickedOnSpanToTheLeftOfCursor = x.toFloat() in charPrevX..charX
50+
val clickedOnSpanToTheRightOfCursor = x.toFloat() in charX..charNextX
5151

5252
val clickedOnSpan = clickedWithinLineHeight &&
5353
(clickedOnSpanToTheLeftOfCursor || clickedOnSpanToTheRightOfCursor)

0 commit comments

Comments
 (0)