zsh-workers
 help / color / mirror / code / Atom feed
* Glitch in optimized menu-selection display
@ 2002-06-02 16:43 Bart Schaefer
  2002-06-04  8:09 ` Sven Wischnowsky
  0 siblings, 1 reply; 4+ messages in thread
From: Bart Schaefer @ 2002-06-02 16:43 UTC (permalink / raw)
  To: zsh-workers

It's very difficult to explain how to reproduce this, but occasionally
when I accept a choice in menu selection and the display is erased, the
word that I selected is "left behind", no longer highlighted but still
visible somewhere in the middle of the white space where the selection
display had been.

This appears to happen only when I navigate with TAB rather than with the
arrow keys, but I'm not sure.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


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

* Re: Glitch in optimized menu-selection display
  2002-06-02 16:43 Glitch in optimized menu-selection display Bart Schaefer
@ 2002-06-04  8:09 ` Sven Wischnowsky
  2002-06-04 14:28   ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Sven Wischnowsky @ 2002-06-04  8:09 UTC (permalink / raw)
  To: zsh-workers


Bart Schaefer wrote:

> It's very difficult to explain how to reproduce this, but occasionally
> when I accept a choice in menu selection and the display is erased, the
> word that I selected is "left behind", no longer highlighted but still
> visible somewhere in the middle of the white space where the selection
> display had been.
> 
> This appears to happen only when I navigate with TAB rather than with the
> arrow keys, but I'm not sure.

Err... `display erased' when you `accept a choice'? It shouldn't get
erased on an accept-line. And it doesn't get for me. Hence I couldn't
reproduce this.


Bye
  Sven

-- 
Sven Wischnowsky                          wischnow@berkom.de


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

* Re: Glitch in optimized menu-selection display
  2002-06-04  8:09 ` Sven Wischnowsky
@ 2002-06-04 14:28   ` Bart Schaefer
  2002-06-05  7:40     ` Sven Wischnowsky
  0 siblings, 1 reply; 4+ messages in thread
From: Bart Schaefer @ 2002-06-04 14:28 UTC (permalink / raw)
  To: Sven Wischnowsky, zsh-workers

On Jun 4, 10:09am, Sven Wischnowsky wrote:
}
} Bart Schaefer wrote:
} 
} > It's very difficult to explain how to reproduce this, but occasionally
} > when I accept a choice in menu selection and the display is erased, the
} > word that I selected is "left behind", no longer highlighted but still
} > visible somewhere in the middle of the white space where the selection
} > display had been.
} 
} Err... `display erased' when you `accept a choice'? It shouldn't get
} erased on an accept-line. And it doesn't get for me. Hence I couldn't
} reproduce this.

OK, I managed to reproduce it:

---------------------------------------------------------------------------
schaefer<501> ls /usr/src/local/zsh/zsh-4.0/Src/c
---------------------------------------------------------------------------

Cursor is over the final 'c' when I press TAB:

---------------------------------------------------------------------------
schaefer<501> ls /usr/src/local/zsh/zsh-4.0/Src/c
Completing files
exec.c       math.c       params.c     prompt.c     options.c    watch.c    
jobs.c       init.c       hist.c       input.c      linklist.c   string.c   
signals.c    glob.c       builtin.c    pattern.c    hashtable.c  modentry.c 
lex.c        cond.c       parse.c      text.c       module.c     mem.c      
utils.c      subst.c      loop.c       compat.c     zsh.rc       main.c     
---------------------------------------------------------------------------

(I have zstyle ':completion:*' file-sort modification)

Press TAB nine times (this many may not be necessary) so that `cond.c' is
highlighted.  Then press accept-line:

---------------------------------------------------------------------------
schaefer<501> ls /usr/src/local/zsh/zsh-4.0/Src/cond.c 




             cond.c       

---------------------------------------------------------------------------

(Cursor is now at the end of the command line after `cond.c '.

Potentially relevant styles:

zstyle ':completion:*' menu 'yes=long' 'select=9'  
zstyle ':completion:*' completer \
	_oldlist _expand _complete _match _ignored _approximate _prefix
zstyle ':completion:*' group-name ''
zstyle ':completion:*' list-colors ''
zstyle ':completion:*' matcher-list '' 'r:|[-._,]=** r:|=**' \
	'm:{a-zA-Z}={A-Za-z} r:|[-._,]=** r:|=**' 'r:|[-._,]=** r:|=** l:|=*'
zstyle ':completion:*' max-errors 2 numeric
zstyle ':completion:*' original true 
zstyle ':completion:*' format 'Completing %d'


-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


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

* Re: Glitch in optimized menu-selection display
  2002-06-04 14:28   ` Bart Schaefer
@ 2002-06-05  7:40     ` Sven Wischnowsky
  0 siblings, 0 replies; 4+ messages in thread
From: Sven Wischnowsky @ 2002-06-05  7:40 UTC (permalink / raw)
  To: zsh-workers


Hi!

Thanks, now I could see it. The fix below should make this most secure
by disallowing the optimisation when we're not in menu selection. I
probably should have thought of that...


Bye
  Sven

Index: Src/Zle/complist.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/complist.c,v
retrieving revision 1.49
diff -u -r1.49 complist.c
--- Src/Zle/complist.c	27 May 2002 07:41:10 -0000	1.49
+++ Src/Zle/complist.c	5 Jun 2002 07:39:04 -0000
@@ -1652,7 +1652,7 @@
     last_cap = (char *) zhalloc(max_caplen + 1);
     *last_cap = '\0';
 
-    if (!mnew && onlnct == nlnct && mlbeg >= 0 && mlbeg == molbeg)
+    if (!mnew && inselect && onlnct == nlnct && mlbeg >= 0 && mlbeg == molbeg)
         singledraw();
     else if (!compprintlist(mselect >= 0) || !clearflag)
 	noselect = 1;

-- 
Sven Wischnowsky                          wischnow@berkom.de


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

end of thread, other threads:[~2002-06-05  7:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-02 16:43 Glitch in optimized menu-selection display Bart Schaefer
2002-06-04  8:09 ` Sven Wischnowsky
2002-06-04 14:28   ` Bart Schaefer
2002-06-05  7:40     ` Sven Wischnowsky

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