summaryrefslogtreecommitdiff
path: root/Src/prompt.c
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2021-12-13 21:06:57 +0100
committerOliver Kiddle <opk@zsh.org>2021-12-13 21:06:57 +0100
commit91b7baf25929a20ee776100f406021a422d56e98 (patch)
treeb2c1c0e7348937cf969f67560382d0f50c6f0589 /Src/prompt.c
parent7791a6876c64ee678da0bd9af954af692146f4fd (diff)
downloadzsh-91b7baf25929a20ee776100f406021a422d56e98.tar.gz
zsh-91b7baf25929a20ee776100f406021a422d56e98.zip
49646: allow colors in WATCHFMT with %F/%K
Diffstat (limited to 'Src/prompt.c')
-rw-r--r--Src/prompt.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/Src/prompt.c b/Src/prompt.c
index 6943eabc3..d6b378539 100644
--- a/Src/prompt.c
+++ b/Src/prompt.c
@@ -1045,9 +1045,9 @@ tsetcap(int cap, int flags)
if (txtisset(TXTUNDERLINE))
tsetcap(TCUNDERLINEBEG, flags);
if (txtisset(TXTFGCOLOUR))
- set_colour_attribute(txtattrmask, COL_SEQ_FG, TSC_PROMPT);
+ set_colour_attribute(txtattrmask, COL_SEQ_FG, flags);
if (txtisset(TXTBGCOLOUR))
- set_colour_attribute(txtattrmask, COL_SEQ_BG, TSC_PROMPT);
+ set_colour_attribute(txtattrmask, COL_SEQ_BG, flags);
}
}
}
@@ -2062,7 +2062,8 @@ set_colour_attribute(zattr atr, int fg_bg, int flags)
*bv->bp++ = Outpar;
}
} else {
- tputs(tgoto(tcstr[tc], colour, colour), 1, putshout);
+ tputs(tgoto(tcstr[tc], colour, colour), 1,
+ (flags & TSC_RAW) ? putraw : putshout);
}
/* That worked. */
return;
@@ -2121,7 +2122,7 @@ set_colour_attribute(zattr atr, int fg_bg, int flags)
*bv->bp++ = Outpar;
}
} else
- tputs(colseq_buf, 1, putshout);
+ tputs(colseq_buf, 1, (flags & TSC_RAW) ? putraw : putshout);
if (do_free)
free_colour_buffer();