diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-09-01 08:11:37 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-09-01 08:11:37 +0300 |
commit | 6e797e23b7c3eb2c4df3418ec007f2196cd3ccd4 (patch) | |
tree | a2cfe9c25ecd171ebb639078ffefb3f04bf4fc9b /src/ui/labelwidget.c | |
parent | acaa77a888a8d937839431a8295c904a12ed8bdc (diff) |
Text: Fixed color escape ASCII overflow
Diffstat (limited to 'src/ui/labelwidget.c')
-rw-r--r-- | src/ui/labelwidget.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ui/labelwidget.c b/src/ui/labelwidget.c index d41cc73c..8b2506e7 100644 --- a/src/ui/labelwidget.c +++ b/src/ui/labelwidget.c | |||
@@ -175,11 +175,11 @@ static void getColors_LabelWidget_(const iLabelWidget *d, int *bg, int *fg, int | |||
175 | /* Frames matching color escaped text. */ | 175 | /* Frames matching color escaped text. */ |
176 | if (startsWith_String(&d->label, "\r")) { | 176 | if (startsWith_String(&d->label, "\r")) { |
177 | if (isDark_ColorTheme(colorTheme_App())) { | 177 | if (isDark_ColorTheme(colorTheme_App())) { |
178 | *frame1 = cstr_String(&d->label)[1] - '0'; | 178 | *frame1 = cstr_String(&d->label)[1] - asciiBase_ColorEscape; |
179 | *frame2 = darker_Color(*frame1); | 179 | *frame2 = darker_Color(*frame1); |
180 | } | 180 | } |
181 | else { | 181 | else { |
182 | *bg = *frame1 = *frame2 = cstr_String(&d->label)[1] - '0'; | 182 | *bg = *frame1 = *frame2 = cstr_String(&d->label)[1] - asciiBase_ColorEscape; |
183 | *fg = uiBackground_ColorId | permanent_ColorId; | 183 | *fg = uiBackground_ColorId | permanent_ColorId; |
184 | } | 184 | } |
185 | } | 185 | } |