commit 1045c7e33f41354c026cf38959bba5bd3e269462
parent ddf8e23ffc25bb96791e037efa3f4c6fcf8916d4
Author: Byron Torres <b@torresjrjr.com>
Date: Mon, 25 Apr 2022 02:11:55 +0100
haredoc: fix tty parameter and type colours
Function parameters are now plain instead of cyan.
Function parameter types are now cyan instead of plain.
Signed-off-by: Byron Torres <b@torresjrjr.com>
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/cmd/haredoc/tty.ha b/cmd/haredoc/tty.ha
@@ -249,9 +249,11 @@ fn prototype_tty(
n += newline(out, indent)?;
} else for (let i = 0z; i < len(t.params); i += 1) {
const param = t.params[i];
- n += fmt::fprintf(out, "\x1b[36m" "{}" "\x1b[0m" ": ",
+ n += fmt::fprintf(out, "{}" "\x1b[0m" ": ",
if (param.name == "") "_" else param.name)?;
+ n += fmt::fprint(out, "\x1b[36m")?;
n += fmt::fprint(out, typenames[i])?;
+ n += fmt::fprint(out, "\x1b[0m")?;
if (i + 1 == len(t.params)) {
switch (t.variadism) {
case variadism::NONE => void;