summaryrefslogtreecommitdiff
path: root/src/fe-common
diff options
context:
space:
mode:
Diffstat (limited to 'src/fe-common')
-rw-r--r--src/fe-common/core/formats.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/fe-common/core/formats.c b/src/fe-common/core/formats.c
index 983a849e..06464894 100644
--- a/src/fe-common/core/formats.c
+++ b/src/fe-common/core/formats.c
@@ -907,9 +907,8 @@ char *strip_codes(const char *input)
if (*p == 27 && p[1] != '\0') {
p++;
p = get_ansi_color(current_theme, p, NULL, NULL, NULL);
- }
-
- if (!IS_COLOR_CODE(*p))
+ p--;
+ } else if (!IS_COLOR_CODE(*p))
*out++ = *p;
}