mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
CodeView.kt: Optimize highlight() Editable length identification
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user