zsh-workers
 help / color / mirror / code / Atom feed
* Bug report: complist miscalculates width of display strings containing a slash (/)
@ 2021-03-26 22:49 Marlon Richert
  2021-04-04 16:08 ` Jun. T
  0 siblings, 1 reply; 2+ messages in thread
From: Marlon Richert @ 2021-03-26 22:49 UTC (permalink / raw)
  To: Zsh hackers list

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-04 16:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-26 22:49 Bug report: complist miscalculates width of display strings containing a slash (/) Marlon Richert
2021-04-04 16:08 ` Jun. T

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).