[reader] FIxed "syntax error" with colors when going backward

This commit is contained in:
Laury
2022-06-27 13:00:30 +02:00
parent 992fb5dc85
commit 2a234305f3

View File

@@ -706,7 +706,11 @@ bool WordWrapTextView::updateTextColorForward(const char * colorStart) const {
bool WordWrapTextView::updateTextColorBackward(const char * colorStart) const {
if (*(colorStart++) != '\\') {
if (*(++colorStart) != '\\') {
if (*(colorStart + 1) == '%' || *(colorStart + 2) == '%') {
m_textColor = Palette::PrimaryText;
return true;
}
return false;
}