diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/ReadView.kt b/app/src/main/java/io/legado/app/ui/book/read/page/ReadView.kt index c2de83697..01578df2d 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/ReadView.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/ReadView.kt @@ -338,8 +338,17 @@ class ReadView(context: Context, attrs: AttributeSet) : } end -= 1 } - curPage.selectStartMoveIndex(firstRelativePage, lineStart, start) - curPage.selectEndMoveIndex(firstRelativePage, lineEnd, end) + try { + curPage.selectStartMoveIndex(firstRelativePage, lineStart, start) + curPage.selectEndMoveIndex(firstRelativePage, lineEnd, end) + } catch (e: Exception) { + print( + """ + curPage.selectStartMoveIndex($firstRelativePage, $lineStart, $start) + curPage.selectEndMoveIndex($firstRelativePage, $lineEnd, $end) + """.trimIndent() + ) + } } }