Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

list-prompt not aligned right



I'm not sure which parts of this are needed to reproduce, so I'll be
as exact as I can, but it does happen under less specific
circumstances.

zsh -f
autoload compinit;compinit
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the
character to insert%s
zstyle ':completion:*:descriptions' format foo
touch aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa{1..40}
# i think the point is they need to be wider than the terminal
ls <tab><tab><tab>

After a couple presses, possible some specific height is also needed,
the shorter the better i think (my terminal right now is 98x24), one
of the "a"s will leak over to the line that has the "Hit TAB for more"
message:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aAt 58%: Hit TAB for more, or the character to insert

Normally i have this too
zstyle ':completion:*' list-colors ${(s.:.)${LS_COLORS}#ec=}
and when the leak happens in this case, the TAB message gets the color
of whatever file spilled over.
zstyle ':completion:*:descriptions' format ''
seems to make the problem go away.

I don't think this is a new problem, but I think in the past i've
ascribed it to wonkiness with multibyte/doublewidth characters, but it
happened now with only ascii so obviously that wasn't it.

-- 
Mikael Magnusson



Messages sorted by: Reverse Date, Date, Thread, Author