zsh-workers
 help / color / mirror / code / Atom feed
From: Marlon Richert <marlon.richert@gmail.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Bug report: complist miscalculates width of display strings containing a slash (/)
Date: Sat, 27 Mar 2021 00:49:55 +0200	[thread overview]
Message-ID: <CAHLkEDtbnFmKiFZ4rgXLvZfo3Fux7yUWbMhF8k5jHKA=j47dMw@mail.gmail.com> (raw)

The following test causes the command line to jump and the completion
menu to visually break when the terminal is 80 columns wide. Similar
effects can be achieved for other terminal sizes by adjusting the
length of the file names. In addition, thereafter, there are
additional redraw errors in the completion menu when changing the
selection. In particular, compare how the menu is redrawn when moving
the selection horizontally vs. vertically. All of this appears to
happen only for file completions of which the display string contains
a slash (/).

$ cd $(mktemp -d); ZDOTDIR=$PWD HOME=$PWD PS1='%# ' exec zsh -f
% zmodload zsh/complist
% autoload compinit; compinit
% mkdir {1..9}foobarba
% _tst() { local -a files=( ~/* ); local -a displ=( "${(@D)files}" );
compadd -d displ -P '~/' -fW ~/ - $files[@]:t }
% compdef _tst tst
% bindkey '^I' menu-select
% tst \t\t


             reply	other threads:[~2021-03-26 22:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-26 22:49 Marlon Richert [this message]
2021-04-04 16:08 ` Jun. T

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='CAHLkEDtbnFmKiFZ4rgXLvZfo3Fux7yUWbMhF8k5jHKA=j47dMw@mail.gmail.com' \
    --to=marlon.richert@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).