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.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 10906 invoked from network); 4 Apr 2021 16:08:44 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 4 Apr 2021 16:08:44 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1617552524; b=BErh/3KGJb05IyCNqVXM0yc1oH0qGNGGklaQMGAZhXqdnLeA66NLB9AYSUmUubczUi1xadOSXE OUTMUtAZcalOun/UMByKokMxSDoTyRvXKn7VotnkC+Y25xlnYGPPNUUJRXjJJX2j2PBrhN9I+P qJWfzZcQ5TTONjusyHNAowdG13mT9MZjUfCUonfSdIbYTrll+iEfX0XYH4R7fFaUZEgWxysj9h nW5L3xDnbwz5Y7uS+uuRPWYqiRV5Y+U1cyBJiLnmcYTRXD1rGr9xguiq/4kIVbU3r9+g97mPX6 kfICHrFd6n8Jl+egKn5PFsOq6hTw6jmfD2L+L+GDi4aYmw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (snd01005-bg.im.kddi.ne.jp) smtp.remote-ip=27.86.113.21; dmarc=none header.from=kba.biglobe.ne.jp; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1617552524; bh=tPLp/Yk2g1nO85AGsatY/pT7JdTxcslG3hcH0IXMYOY=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:To:References:Message-ID:Content-Transfer-Encoding:Cc:Date: In-Reply-To:From:Subject:MIME-Version:Content-Type:DKIM-Signature; b=tfAo+7oXaDAF6/0hgzCoW726bc8bIK9gwCzEXhvcMOq4qhUFAen4Pz+Pl2uG3MIeNixjVnCNbn Ww02HrxSiG+R52onl3nO6MynzfZNU4rXdvH7SLpLyOvPj1jx2e6WxQWadHOOmsWpklg5oPTEsZ TJoioUAduuEF4dQvdAA2aCdZEgQz604Iic2xLPNynQ6Ck75NYyBTZc0DwWC+gBMXOWSmFdkizK H7my0w0VdiTlAK+sDpAuPCfW+c7HwfIOn/x+1MVhED0AwmqEj/Do1iV9YrTb9ijzOox8CBAAKS L0469wHP+dZ15tOaPvAf5ZRZTzgpW8K2xRdg5ppZSNMDhw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:To:References:Message-Id: Content-Transfer-Encoding:Cc:Date:In-Reply-To:From:Subject:Mime-Version: Content-Type:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=mj1GHZV2VV4JXIuZFrh8DhXJGskoaashNwg2gfBNWdw=; b=jvx/T3GaH4hk7chc6eDnZ/NrAL Y+JGaeOBlvzcs/61EZKDzAjpa+aUVDMExxI7kwnwl5pKq3JJwoKysbyNXMExSvpbKdCNAs6rgoYH4 JTMbPB58Pp18sG2g7uyAXWERhTQ04Y05Ey8KDnjGCHZTVGfL/qtRS4A6yExI3SAzml7FkJ4CYB9ec /RVI516So7CYY5iXoKbJJvo+1m0+l9vOgXiOeLm7UhIWp3LTAG1X/KbMFkSRoLOa87OYB3eLjFy2W BALV7/qBff1uJVQdRnJfnCiuMgret4wQA8AwRJb229cgUwsH0XDpDglEzreITU4M2Y/EsR9mnPBcg wceA0Wag==; Received: from authenticated user by zero.zsh.org with local id 1lT5In-0006hP-VX; Sun, 04 Apr 2021 16:08:41 +0000 Authentication-Results: zsh.org; iprev=pass (snd01005-bg.im.kddi.ne.jp) smtp.remote-ip=27.86.113.21; dmarc=none header.from=kba.biglobe.ne.jp; arc=none Received: from snd01005-bg.im.kddi.ne.jp ([27.86.113.21]:48801 helo=omta1012.biglobe.ne.jp) by zero.zsh.org with esmtp id 1lT5IR-0006YG-9l; Sun, 04 Apr 2021 16:08:21 +0000 Received: from mail.biglobe.ne.jp by omta1012.biglobe.ne.jp with ESMTP id <20210404160815020.EQVW.45585.mail.biglobe.ne.jp@biglobe.ne.jp>; Mon, 5 Apr 2021 01:08:15 +0900 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.17\)) Subject: Re: Bug report: complist miscalculates width of display strings containing a slash (/) From: "Jun. T" In-Reply-To: Date: Mon, 5 Apr 2021 01:08:14 +0900 Cc: Marlon Richert Content-Transfer-Encoding: 7bit Message-Id: <7CD89E1D-3B11-42B1-A794-F09E5A32F16C@kba.biglobe.ne.jp> References: To: zsh-workers@zsh.org X-Mailer: Apple Mail (2.3445.104.17) X-Biglobe-Sender: takimoto-j@kba.biglobe.ne.jp X-Seq: 48391 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: Archived-At: > 2021/03/27 7:49, Marlon Richert wrote: > > The following test causes the command line to jump and the completion > menu to visually break ... Thank you for reporting, and sorry for not responding quickly. It seems the problem occurs if both '-d disp' and '-f' are given to compadd, and menu-select is called. # It becomes more serious if width of the list of completions # is equal (or close?) to the screen width due to the wrapping. The following patch add an extra width 1 for the trailing file-type indicator (/ for directory, etc.) when '-d disp' is given, just as for the case without '-d disp' (line 2351, 15 lines below the patched line). diff --git a/Src/Zle/compresult.c b/Src/Zle/compresult.c index 30fc60b78..8b5955819 100644 --- a/Src/Zle/compresult.c +++ b/Src/Zle/compresult.c @@ -1583,7 +1583,7 @@ calclist(int showall) nlines += 1 + printfmt(m->disp, 0, 0, 0); g->flags |= CGF_HASDL; } else { - l = ZMB_nicewidth(m->disp); + l = ZMB_nicewidth(m->disp) + !!m->modec; ndisp++; if (l > glong) glong = l;