Merge pull request #1583 from 1552980358/master

CodeView.kt: Optimize highlight() Editable length identification
pull/1586/head^2
kunfei 3 years ago committed by GitHub
commit 9c6b3caf18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      app/src/main/java/io/legado/app/ui/widget/code/CodeView.kt

@ -169,7 +169,10 @@ class CodeView : AppCompatMultiAutoCompleteTextView {
}
private fun highlight(editable: Editable): Editable {
if (editable.isEmpty() || editable.length > 1024) return editable
// if (editable.isEmpty() || editable.length > 1024) return editable
if (editable.length !in 1 .. 1024) {
return editable
}
try {
clearSpans(editable)
highlightErrorLines(editable)

Loading…
Cancel
Save