字符串大于1024时禁用代码高亮

pull/1576/head^2
kunfei 3 years ago
parent 92be85e69d
commit c0e710affc
  1. 2
      app/src/main/java/io/legado/app/ui/widget/code/CodeView.kt

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

Loading…
Cancel
Save