From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 8967 invoked from network); 19 Jan 2023 21:19:08 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 19 Jan 2023 21:19:08 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Message-ID:Date:Content-ID: Content-Type:MIME-Version:Subject:To:References:From:In-reply-to:cc:Reply-To: Content-Transfer-Encoding:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=qz3OjXSiBdMmDVhVgGVuatTBs2Cjem2wSSLLz2I0hhQ=; b=emS7qNpRvakAdv4Hchwfv+zT56 UMEcc0dCTpB/s6nkgZZgFfG6MANumjsb10Pxmv0nC984LW77tu8Hi+bGxX4JIGdjtV/41JIrwKTDX 7HyUeOSZBfY+Ya3qEvciciZ3w56mTC2wgV04c9MA/Gl8wAwRisZWRHUw5ZahURsyOZ09PWJDsLPdC qsDpsbUd9P/VOsQd4mZ9V8WEEfkDlxWi3kaZDvTGGYNejig64tVeQBQCfUwkUaDvuRu9AT5vgxXSa IWyzULtN5gCOcp5E+ceniNDzNxHR4TDuoiR51sbLcyKLld4TETP+0pKmjYb8QNrWjAeJa5uW7P34N hfo3KKrA==; Received: by zero.zsh.org with local id 1pIcJP-000M2l-Ir; Thu, 19 Jan 2023 21:19:07 +0000 Received: by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1pIcIr-000LjK-9Z; Thu, 19 Jan 2023 21:18:33 +0000 Received: from [192.168.178.21] (helo=hydra) by mail.kiddle.eu with esmtp(Exim 4.95) (envelope-from ) id 1pIcIo-000DJM-SV; Thu, 19 Jan 2023 22:18:31 +0100 cc: Zsh workers In-reply-to: From: Oliver Kiddle References: <36223-1672793943.791824@SLuG.9t5a.jH-P> <2468-1673042601.684998@j4zI.qkM4.yrwt> To: Mikael Magnusson Subject: Re: PATCH: support for italic and faint fonts from region_highlight MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <51170.1674163110.1@hydra> Date: Thu, 19 Jan 2023 22:18:30 +0100 Message-ID: <51171-1674163110.743900@w5-F.JofK.-02M> X-Seq: 51320 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: 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;