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

PATCH: Re: Lots of flickering in menu-selection, and a send-break problem



Bart Schaefer wrote:

> It goes by too fast for me to see what's really happening, but try this.
> 
> Start a menu selection with a large number of completions, enough to fill
> most of the screen or even to require scrolling.
> 
> Now hit ESC-x to invoke execute-named-command.
> 
> Now abort that with C-g (send-break).
> 
> You get a bunch of flickering and then you're thrown back to the PS1 prompt
> with the current command aborted.  Ick!  I just wanted to get out of the
> execute: prompt, not blow away the whole command line.

The problem was that getkeycmd() returned undefined-key for a aborted
execute-named-command and menu-selection didn't catch that.

Dunno if the patch gives you what you want, but it's the cleanest
implementation I can think of.

> You get similar flickering if you abort out of a scrolling menu-selection
> with C-u (kill-whole-line).  I don't see the flicker when not scrolling.

Ick. No patch for this yet. Menu-selection redisplays the (part of
the) list again without the mark when it's finished. That's a good
thing, I think. But then kill-whole-line comes and clears the list
again (same happens with all the other widgets that clear the list).

I think adding a ZLE_* flag that says that the widget clears the
screen and testing the flag in menu-selection to avoid re-displaying
the list is the best solution. A problem might be the functions that
clear the list only in some cases...

Bye
 Sven

Index: Src/Zle/complist.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/complist.c,v
retrieving revision 1.9
diff -u -r1.9 complist.c
--- Src/Zle/complist.c	2000/04/27 08:23:33	1.9
+++ Src/Zle/complist.c	2000/04/27 08:53:08
@@ -2034,6 +2034,8 @@
 	    setwish = 1;
 	    mline = -1;
 	    continue;
+	} else if (cmd == Th(z_undefinedkey)) {
+	    continue;
 	} else {
 	    ungetkeycmd();
 	    break;

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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