diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-12-13 11:21:15 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-12-13 11:21:15 +0200 |
commit | 730540332cbeaf949263bdf5dae5714688f0d10a (patch) | |
tree | de4b43f58cc40848643cdd6a296913537b943ab9 /src/ui/text.c | |
parent | 71699b5095d1acb01946537cdc7aa4022c28a126 (diff) |
Fixed UI text color regression
Diffstat (limited to 'src/ui/text.c')
-rw-r--r-- | src/ui/text.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ui/text.c b/src/ui/text.c index c36fceb5..231c2976 100644 --- a/src/ui/text.c +++ b/src/ui/text.c | |||
@@ -658,7 +658,7 @@ static iRect run_Font_(iFont *d, enum iRunMode mode, iRangecc text, size_t maxLe | |||
658 | iRegExpMatch m; | 658 | iRegExpMatch m; |
659 | init_RegExpMatch(&m); | 659 | init_RegExpMatch(&m); |
660 | if (match_RegExp(text_.ansiEscape, chPos, text.end - chPos, &m)) { | 660 | if (match_RegExp(text_.ansiEscape, chPos, text.end - chPos, &m)) { |
661 | if (mode & draw_RunMode) { | 661 | if (mode & draw_RunMode && ~mode & permanentColorFlag_RunMode) { |
662 | /* Change the color. */ | 662 | /* Change the color. */ |
663 | const iColor clr = | 663 | const iColor clr = |
664 | ansiForeground_Color(capturedRange_RegExpMatch(&m, 1), tmParagraph_ColorId); | 664 | ansiForeground_Color(capturedRange_RegExpMatch(&m, 1), tmParagraph_ColorId); |
@@ -729,7 +729,7 @@ static iRect run_Font_(iFont *d, enum iRunMode mode, iRangecc text, size_t maxLe | |||
729 | } | 729 | } |
730 | if (ch == '\r') { | 730 | if (ch == '\r') { |
731 | const iChar esc = nextChar_(&chPos, text.end); | 731 | const iChar esc = nextChar_(&chPos, text.end); |
732 | if (mode & draw_RunMode) { | 732 | if (mode & draw_RunMode && ~mode & permanentColorFlag_RunMode) { |
733 | const iColor clr = get_Color(esc - asciiBase_ColorEscape); | 733 | const iColor clr = get_Color(esc - asciiBase_ColorEscape); |
734 | SDL_SetTextureColorMod(text_.cache, clr.r, clr.g, clr.b); | 734 | SDL_SetTextureColorMod(text_.cache, clr.r, clr.g, clr.b); |
735 | } | 735 | } |