zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <opk@zsh.org>
To: Mikael Magnusson <mikachu@gmail.com>
Cc: Zsh workers <zsh-workers@zsh.org>
Subject: Re: PATCH: support for italic and faint fonts from region_highlight
Date: Thu, 19 Jan 2023 22:18:30 +0100	[thread overview]
Message-ID: <51171-1674163110.743900@w5-F.JofK.-02M> (raw)
In-Reply-To: <CAHYJk3Rh-grjvTmjvmJXWy8d4vik_S82uH_EbTXDCOpkPvjoJQ@mail.gmail.com>

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;


  reply	other threads:[~2023-01-19 21:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-04  0:59 Oliver Kiddle
2023-01-06 22:03 ` Oliver Kiddle
2023-01-19 16:22   ` Mikael Magnusson
2023-01-19 21:18     ` Oliver Kiddle [this message]
2023-01-20  0:22       ` Mikael Magnusson
2023-02-08 22:52         ` Oliver Kiddle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51171-1674163110.743900@w5-F.JofK.-02M \
    --to=opk@zsh.org \
    --cc=mikachu@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).