From 24a82b9dad1cbe109d9fb5753c429fd37b1618cd Mon Sep 17 00:00:00 2001 From: Stephane Chazelas Date: Wed, 9 Sep 2020 11:27:47 +0100 Subject: 47352 (+ extra test cases): fix %K prompt expansion Fixed a regression introduced by workers/30496 (5.0.3) whereby %2K would no longer be the equivalent of %K{2} (%K{green}) in prompt expansion. That was one missing case where the is_fg flag was not passed along to match_colour() after code factorisation. Add tests for the different syntax variants, using echoti as a reference. --- Src/prompt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Src/prompt.c') diff --git a/Src/prompt.c b/Src/prompt.c index bc9734720..997327e18 100644 --- a/Src/prompt.c +++ b/Src/prompt.c @@ -258,7 +258,7 @@ parsecolorchar(zattr arg, int is_fg) bv->fm--; } } else - arg = match_colour(NULL, 1, arg); + arg = match_colour(NULL, is_fg, arg); return arg; } -- cgit v1.2.3