From 4866ecbca5b71f52852cea6a63d119fe731c9b9a Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Mon, 27 Dec 2021 13:45:17 +0200 Subject: Text: Fixed color escapes in the simple text renderer --- src/ui/text_simple.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/ui') diff --git a/src/ui/text_simple.c b/src/ui/text_simple.c index 8560c138..71942cf1 100644 --- a/src/ui/text_simple.c +++ b/src/ui/text_simple.c @@ -118,8 +118,9 @@ static iRect runSimple_Font_(iFont *d, const iRunArgs *args) { if (match_RegExp(activeText_->ansiEscape, chPos, args->text.end - chPos, &m)) { if (mode & draw_RunMode && ~mode & permanentColorFlag_RunMode) { /* Change the color. */ - iColor clr; - ansiColors_Color(capturedRange_RegExpMatch(&m, 1), tmParagraph_ColorId, + iColor clr = get_Color(args->color); + ansiColors_Color(capturedRange_RegExpMatch(&m, 1), + activeText_->baseFgColorId, none_ColorId, &clr, NULL); SDL_SetTextureColorMod(activeText_->cache, clr.r, clr.g, clr.b); if (args->mode & fillBackground_RunMode) { -- cgit v1.2.3