zsh-users
 help / color / mirror / code / Atom feed
* menu-completion bug
@ 2017-03-15 18:42 Vadim A. Misbakh-Soloviov
  2017-03-20  1:54 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Vadim A. Misbakh-Soloviov @ 2017-03-15 18:42 UTC (permalink / raw)
  To: ZSH Mail List

[-- Attachment #1: Type: text/plain, Size: 1034 bytes --]

Hi, List!

It seems, I've found a bug in menu completion or somewhere around...

Can somebody condifm it (or tell me TERM value and which term do you use, in 
case if it doesn't reproduce for you)?

This is minimal testcase:

1) run `zsh -f`
2) paste code below (it is prefixed with spaces, so shouldn't be saved in your 
history file):

  autoload -Uz compinit && compinit
  zstyle ':completion:*:ssh:*' hosts {0..50}asdfghjklasdfghjkl
  zstyle ':completion:*:ssh:*' users {100..150}asdfgh
  zstyle ':completion:*' menu true select
  zstyle ':completion:*:hosts' list-colors 'no=32'


Now, try to write `ssh ` (including space), then press tab. Completion menu 
will be opened. Now, try to hold down "right arrow" key.

If you see that pre-last column items getting "reversed" green colour (i.e. 
foreground=terminal-default-fg-color,background=green), then you just 
confirmed bug.


Also, I'd be glad to get some recommendations about what should I do to get it 
fixed (report that bug somewhere else, maybe?).


Thanks in advance!

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: menu-completion bug
  2017-03-15 18:42 menu-completion bug Vadim A. Misbakh-Soloviov
@ 2017-03-20  1:54 ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2017-03-20  1:54 UTC (permalink / raw)
  To: ZSH Mail List, ZSH Mail List; +Cc: Vadim A. Misbakh-Soloviov

On Mar 16,  1:42am, Vadim A. Misbakh-Soloviov wrote:
}
} If you see that pre-last column items getting "reversed" green colour
} (i.e. foreground=terminal-default-fg-color,background=green), then you
} just confirmed bug.

This isn't strictly a completion bug, rather it's a problem with the
coloring support in the complist module.

There are several things going on at once here -- the matches are being
color-coded, the menu navigation is maintaining the reverse-video for
the current selection position, and various things like the "@" between
username and hostname are being highlighted on the command line.  For
some of these there is no explicit ANSI sequence to turn exactly one
attribute off, instead everything has to be reset.  So on some of the
repaint positions, the sequences to turn a new effect on are issued,
and an artifact of the old sequences is left.

This seems to come down to whether clprintm(), called from singledraw()
at line 1947, returns early without outputting anything.  That works if
only the default colors are being used, but not when the "normal text"
color has been changed.  So I suspect it's an optimization gone wrong.

That's as far as I've gotten.  Further discussion should probably be on
the zsh-workers list.


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

end of thread, other threads:[~2017-03-20  1:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-15 18:42 menu-completion bug Vadim A. Misbakh-Soloviov
2017-03-20  1:54 ` Bart Schaefer

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