Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: support for italic and faint fonts from region_highlight



Mikael Magnusson wrote:
> I didn't check exactly which of your patches caused this problem, but
> i'll reply here.

Did you check without my patches because I can reproduce the problem
even with 5.8. There is, nevertheless, a patch for it below.
You'll still get the full highlighted line if you leave attributes on at
the end of the prompt but I regard all behaviour associated with doing
that as there for backward compatibility only. I was thinking we should
maybe add zle_highlight tokens for the editarea, messages and statusline
so that there are better alternatives to doing that.

It is something of a curiosity that the following will give you a
highlighted line when it needs to scroll but not when run elsewhere in
the terminal window:

  printf '\e[48;5;189m\ncat\e[49m\n'

Some more obscure terminals don't do this, not sure if that's a bug in
them.

> not be. Similar artifacts sometimes happen when the completion
> continuation prompt is shown ("At Top: Hit space for more..."), and I
> also noticed in some circumstances when I hit alt-m to start menu
> selection, the selected entry is not showed highlighted until I move
> it once or hit ^L, but I don't have a minimal reproducer for those
> things.

All the attribute handling in complist is very much completely separate
code that I haven't touched. The group descriptions do use prompt
sequences but it is otherwise mostly based on the LS_COLOURS compatible
format instead of using the zattr type. It is still certainly possible
I've introduced something there and, either way, a minimal reproducer
would definitely help. Also mention the value of $TERM, the terminal and
what OS/termcap implementation you have. My setup doesn't ever involve
the completion continuation prompt you describe, at least not at the
top. I've seen glitches in the completion display in the past so there
may be old lingering bugs.

Oliver

diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c
index 686c6f5b4..571800a18 100644
--- a/Src/Zle/zle_main.c
+++ b/Src/Zle/zle_main.c
@@ -2069,9 +2069,9 @@ trashzle(void)
 	trashedzle = 1;
 	zrefresh();
 	showinglist = sl;
-	moveto(nlnct, 0);
 	treplaceattrs(prompt_attr);
 	applytextattributes(0);
+	moveto(nlnct, 0);
 	if (clearflag && tccan(TCCLEAREOD)) {
 	    tcout(TCCLEAREOD);
 	    clearflag = listshown = 0;




Messages sorted by: Reverse Date, Date, Thread, Author