1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-06-13 07:48:05 +02:00

51289: don't disable non-colour attributes in prompts for SINGLE_LINE_ZLE and remove superfluous extra escapes to disable attributes

This commit is contained in:
Oliver Kiddle 2023-01-10 21:06:55 +01:00
parent 9d99a01367
commit cc672f1c3b
3 changed files with 5 additions and 4 deletions

View file

@ -1,5 +1,9 @@
2023-01-10 Oliver Kiddle <opk@zsh.org> 2023-01-10 Oliver Kiddle <opk@zsh.org>
* 51289: Src/Zle/zle_refresh.c, Src/prompt.c: don't disable
non-colour attributes in prompts for SINGLE_LINE_ZLE and remove
superfluous extra escapes to disable attributes
* 51281: Src/Zle/zle_main.c, Src/Zle/zle_refresh.c, Src/zsh.h: * 51281: Src/Zle/zle_main.c, Src/Zle/zle_refresh.c, Src/zsh.h:
keep track of attributes left on at the end of left and right keep track of attributes left on at the end of left and right
prompts and reapply them explicitly as appropriate prompts and reapply them explicitly as appropriate

View file

@ -1107,8 +1107,6 @@ zrefresh(void)
#endif #endif
/* we probably should only have explicitly set attributes */ /* we probably should only have explicitly set attributes */
tsetcap(TCALLATTRSOFF, 0); tsetcap(TCALLATTRSOFF, 0);
tsetcap(TCSTANDOUTEND, 0);
tsetcap(TCUNDERLINEEND, 0);
txtcurrentattrs = txtpendingattrs = txtunknownattrs = 0; txtcurrentattrs = txtpendingattrs = txtunknownattrs = 0;
if (trashedzle && !clearflag) if (trashedzle && !clearflag)

View file

@ -1004,8 +1004,7 @@ stradd(char *d)
mod_export void mod_export void
tsetcap(int cap, int flags) tsetcap(int cap, int flags)
{ {
if (tccan(cap) && !isset(SINGLELINEZLE) && if (tccan(cap) && !(termflags & (TERM_NOUP|TERM_BAD|TERM_UNKNOWN))) {
!(termflags & (TERM_NOUP|TERM_BAD|TERM_UNKNOWN))) {
switch (flags) { switch (flags) {
case TSC_RAW: case TSC_RAW:
tputs(tcstr[cap], 1, putraw); tputs(tcstr[cap], 1, putraw);