Better handle deeply nested help highlighting.
This commit is contained in:
parent
86f3f4b32c
commit
bf2b9504a6
|
@ -284,10 +284,10 @@ char* getHelp(const char* symbol)
|
||||||
while(test[c]) {
|
while(test[c]) {
|
||||||
if (test[c] == '(') {
|
if (test[c] == '(') {
|
||||||
depth += 1;
|
depth += 1;
|
||||||
textCursor += sprintf(textCursor, "[3%dm", depth + 2);
|
textCursor += sprintf(textCursor, "[3%dm", (depth % 6) + 2);
|
||||||
} else if (test[c] == ')') {
|
} else if (test[c] == ')') {
|
||||||
depth -= 1;
|
depth -= 1;
|
||||||
textCursor += sprintf(textCursor, ")[3%dm", depth + 2);
|
textCursor += sprintf(textCursor, ")[3%dm", (depth % 6) + 2);
|
||||||
c++;
|
c++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue