From 730540332cbeaf949263bdf5dae5714688f0d10a Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Sun, 13 Dec 2020 11:21:15 +0200 Subject: Fixed UI text color regression --- src/ui/text.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ui') 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 iRegExpMatch m; init_RegExpMatch(&m); if (match_RegExp(text_.ansiEscape, chPos, text.end - chPos, &m)) { - if (mode & draw_RunMode) { + if (mode & draw_RunMode && ~mode & permanentColorFlag_RunMode) { /* Change the color. */ const iColor clr = 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 } if (ch == '\r') { const iChar esc = nextChar_(&chPos, text.end); - if (mode & draw_RunMode) { + if (mode & draw_RunMode && ~mode & permanentColorFlag_RunMode) { const iColor clr = get_Color(esc - asciiBase_ColorEscape); SDL_SetTextureColorMod(text_.cache, clr.r, clr.g, clr.b); } -- cgit v1.2.3