From 026bf90b29314486d64f93c0633dffda8ac58379 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Mon, 13 Apr 2020 13:13:01 +0100 Subject: ash: reset ANSI emulation when BB_SKIP_ANSI_EMULATION changes Update the skip status on the first call to skip_ansi_emulation() and whenever the BB_SKIP_ANSI_EMULATION variable changes. --- shell/ash.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'shell') diff --git a/shell/ash.c b/shell/ash.c index ca8acd705..4f1fe005b 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -2248,6 +2248,14 @@ static void change_seconds(const char *) FAST_FUNC; static void change_realtime(const char *) FAST_FUNC; #endif +#if ENABLE_PLATFORM_MINGW32 +static void FAST_FUNC +change_skip_ansi(const char *newval UNUSED_PARAM) +{ + skip_ansi_emulation(TRUE); +} +#endif + static const struct { int flags; const char *var_text; @@ -2284,6 +2292,9 @@ static const struct { #if ENABLE_FEATURE_EDITING_SAVEHISTORY { VSTRFIXED|VTEXTFIXED|VUNSET, "HISTFILE" , NULL }, #endif +#if ENABLE_PLATFORM_MINGW32 + { VSTRFIXED|VTEXTFIXED|VUNSET, bb_skip_ansi_emulation, change_skip_ansi }, +#endif }; struct redirtab; -- cgit v1.2.3-55-g6feb