Skip to content

Commit

Permalink
textfield [bugfix, simple] foundation. textfield. Fix Ctrl+Backspace …
Browse files Browse the repository at this point in the history
…in TextField (#329)

Issue JetBrains/compose-multiplatform#2466

Co-Authored-By: Silas <s.develop@4-dc.de>

Co-authored-by: Silas <s.develop@4-dc.de>
  • Loading branch information
2 people authored and igordmn committed Nov 16, 2023
1 parent 6ee60d8 commit dacdae6
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ internal abstract class BaseTextPreparedSelection<T : BaseTextPreparedSelection<

private fun charOffset(offset: Int) =
offset.coerceAtMost(text.length - 1)
.coerceAtLeast(0)

private fun getParagraphStart() = text.findParagraphStart(selection.min)

Expand Down Expand Up @@ -429,4 +430,4 @@ internal class TextFieldPreparedSelection(
value.getOffsetForPosition(Offset(x, y))
)
}
}
}

0 comments on commit dacdae6

Please sign in to comment.