mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-12-28 16:15:02 +01:00
51320, 51383: fixes to prevent later reappearance of old attributes
Also associated test updates and a test fix for TERM=dumb.
This commit is contained in:
parent
d6b027c3c1
commit
6502d05897
6 changed files with 14 additions and 3 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2023-02-09 Oliver Kiddle <opk@zsh.org>
|
||||||
|
|
||||||
|
* 51320, 51383: Src/Zle/zle_main.c, Src/Zle/complist.c,
|
||||||
|
Src/Zle/zle_tricky.c, Test/D01prompt.ztst,
|
||||||
|
Test/X04zlehighlight.ztst: fixes to prevent later reappearance
|
||||||
|
of old attributes
|
||||||
|
|
||||||
2023-02-06 Peter Stephenson <p.stephenson@samsung.com>
|
2023-02-06 Peter Stephenson <p.stephenson@samsung.com>
|
||||||
|
|
||||||
* 51350: Src/subst.c, Test/D04parameter.ztst: the combination
|
* 51350: Src/subst.c, Test/D04parameter.ztst: the combination
|
||||||
|
|
|
@ -1305,6 +1305,8 @@ compprintfmt(char *fmt, int n, int dopr, int doesc, int ml, int *stop)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (dopr) {
|
if (dopr) {
|
||||||
|
treplaceattrs(0);
|
||||||
|
applytextattributes(0);
|
||||||
if (!(cc % zterm_columns))
|
if (!(cc % zterm_columns))
|
||||||
fputs(" \010", shout);
|
fputs(" \010", shout);
|
||||||
cleareol();
|
cleareol();
|
||||||
|
|
|
@ -2071,9 +2071,9 @@ trashzle(void)
|
||||||
trashedzle = 1;
|
trashedzle = 1;
|
||||||
zrefresh();
|
zrefresh();
|
||||||
showinglist = sl;
|
showinglist = sl;
|
||||||
moveto(nlnct, 0);
|
|
||||||
treplaceattrs(prompt_attr);
|
treplaceattrs(prompt_attr);
|
||||||
applytextattributes(0);
|
applytextattributes(0);
|
||||||
|
moveto(nlnct, 0);
|
||||||
if (clearflag && tccan(TCCLEAREOD)) {
|
if (clearflag && tccan(TCCLEAREOD)) {
|
||||||
tcout(TCCLEAREOD);
|
tcout(TCCLEAREOD);
|
||||||
clearflag = listshown = 0;
|
clearflag = listshown = 0;
|
||||||
|
|
|
@ -2560,6 +2560,8 @@ printfmt(char *fmt, int n, int dopr, int doesc)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (dopr) {
|
if (dopr) {
|
||||||
|
treplaceattrs(0);
|
||||||
|
applytextattributes(0);
|
||||||
if (!(cc % zterm_columns))
|
if (!(cc % zterm_columns))
|
||||||
fputs(" \010", shout);
|
fputs(" \010", shout);
|
||||||
if (tccan(TCCLEAREOL))
|
if (tccan(TCCLEAREOL))
|
||||||
|
|
|
@ -261,7 +261,7 @@
|
||||||
A1=${(%):-%s}
|
A1=${(%):-%s}
|
||||||
A2=${(%):-%u}
|
A2=${(%):-%u}
|
||||||
A3=${(%):-%s%u%s}
|
A3=${(%):-%s%u%s}
|
||||||
[[ $A3 = $A1$A2 && -n $A1 && -n $A2 ]]
|
[[ $A3 = $A1$A2 ]]
|
||||||
0:Attribute optimisation - preserve initial disabling of attribute but drop useless later one
|
0:Attribute optimisation - preserve initial disabling of attribute but drop useless later one
|
||||||
|
|
||||||
: ${(%):-%K{blue}}
|
: ${(%):-%K{blue}}
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
# Fix e^Mexit - match ((?)\r(?)), if \2 == \3, then replace with \2
|
# Fix e^Mexit - match ((?)\r(?)), if \2 == \3, then replace with \2
|
||||||
# otherwise replace with \1 stripped out of leading/trailing [[:space:]]
|
# otherwise replace with \1 stripped out of leading/trailing [[:space:]]
|
||||||
REPLY=${REPLY//(#b)((?(#c0,1))$cm(?(#c0,1)))/${${${(M)match[2]:#${match[3]}}:+${match[2]}}:-${${match[1]##[[:space:]]##}%%[[:space:]]##}}}
|
REPLY=${REPLY//(#b)((?(#c0,1))$cm(?(#c0,1)))/${${${(M)match[2]:#${match[3]}}:+${match[2]}}:-${${match[1]##[[:space:]]##}%%[[:space:]]##}}}
|
||||||
[[ -n "$REPLY" ]] && print -r -- ${${REPLY%%[[:space:]]##}##[[:space:]]##}
|
[[ -n "$REPLY" ]] && print -r -- ${${REPLY%%${~cm}*}##[[:space:]]##}
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
zpty_stop() {
|
zpty_stop() {
|
||||||
|
|
Loading…
Reference in a new issue