fix(ui): regex cannot show in editor
This commit is contained in:
@@ -40,6 +40,12 @@ public class JavaScriptHighlighter implements SimpleTextWatcher.AfterTextChanged
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void addToken(int tokenStart, int tokenEnd, int color) {
|
public void addToken(int tokenStart, int tokenEnd, int color) {
|
||||||
|
if(mCount < tokenStart){
|
||||||
|
int c = mCount > 0 ? colors[mCount - 1] : color;
|
||||||
|
for (int i = mCount; i < tokenStart; i++) {
|
||||||
|
colors[i] = c;
|
||||||
|
}
|
||||||
|
}
|
||||||
for (int i = tokenStart; i < tokenEnd; i++) {
|
for (int i = tokenStart; i < tokenEnd; i++) {
|
||||||
colors[i] = color;
|
colors[i] = color;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user