summaryrefslogtreecommitdiff
path: root/Src
diff options
context:
space:
mode:
authorStephane Chazelas <stephane@chazelas.org>2020-09-09 11:27:47 +0100
committerStephane Chazelas <stephane@chazelas.org>2020-09-10 07:34:56 +0100
commit24a82b9dad1cbe109d9fb5753c429fd37b1618cd (patch)
tree2fba000b8fc5124a6b999324d2e8f89df52f8c37 /Src
parent0673212f4296275de1cf9935446580930109c9a5 (diff)
downloadzsh-24a82b9dad1cbe109d9fb5753c429fd37b1618cd.tar.gz
zsh-24a82b9dad1cbe109d9fb5753c429fd37b1618cd.zip
47352 (+ extra test cases): fix %<n>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.
Diffstat (limited to 'Src')
-rw-r--r--Src/prompt.c2
1 files changed, 1 insertions, 1 deletions
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;
}