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

where-is et al: improved fix



-----BEGIN PGP SIGNED MESSAGE-----

The patch below is an improvement on Zoltan's patch for where-is et al,
making them work properly when a completion list is on the screen.  It
also fixes a potential problem with listing expansions, that probably
couldn't happen in the code exactly as it was.  (It only occurred in
execute-named-command.)  After this patch is applied, where-is and
describe-key-briefly won't stop a menu completion, but will only remove
the list from the screen.  It can then be brought back with
list-choices.  Similarly execute-named-command, when completion is
performed in the minibuffer.

If you haven't applied Zoltan's patch, then this won't apply cleanly;
just ignore the failures in zle_bindings.c and zle_misc.c.

 -zefram

      *** 1.6	1995/07/21 22:10:34
      --- zle_bindings.c	1995/07/22 18:02:22
      ***************
      *** 188,195 ****
            {"history-beginning-search-backward", historybeginningsearchbackward, ZLE_HISTSEARCH},
            {"history-beginning-search-forward", historybeginningsearchforward, ZLE_HISTSEARCH},
            {"expand-or-complete-prefix", expandorcompleteprefix, ZLE_MENUCMP},
      !     {"describe-key-briefly", describekeybriefly, 0},
      !     {"where-is", whereis, 0},
            {"vi-kill-eol", vikilleol, ZLE_KILL},
            {"vi-yank-whole-line", viyankwholeline, 0},
            {"vi-put-before", viputbefore, ZLE_YANK},
      --- 188,195 ----
            {"history-beginning-search-backward", historybeginningsearchbackward, ZLE_HISTSEARCH},
            {"history-beginning-search-forward", historybeginningsearchforward, ZLE_HISTSEARCH},
            {"expand-or-complete-prefix", expandorcompleteprefix, ZLE_MENUCMP},
      !     {"describe-key-briefly", describekeybriefly, ZLE_MENUCMP},
      !     {"where-is", whereis, ZLE_MENUCMP},
            {"vi-kill-eol", vikilleol, ZLE_KILL},
            {"vi-yank-whole-line", viyankwholeline, 0},
            {"vi-put-before", viputbefore, ZLE_YANK},
      *** 1.5	1995/07/21 22:10:34
      --- zle_main.c	1995/07/22 18:03:31
      ***************
      *** 1073,1078 ****
      --- 1073,1079 ----
        	putc('\r', shout), tcmultout(TCUP, TCMULTUP, nlnct);
            else
        	putc('\n', shout);
      +     showinglist = 0;
        }
        
        static int func, funcfound;
      ***************
      *** 1125,1130 ****
      --- 1126,1132 ----
        	putc('\r', shout), tcmultout(TCUP, TCMULTUP, nlnct);
            else
        	putc('\n', shout);
      +     showinglist = 0;
        }
        
        /**/
      *** 1.6	1995/07/21 22:12:29
      --- zle_misc.c	1995/07/22 17:57:49
      ***************
      *** 577,583 ****
        	*ptr = '\0';
        	if ((cmd = getkeycmd()) < 0 || cmd == z_sendbreak) {
        	    statusline = NULL;
      - 	    showinglist = 0;
        	    return z_undefinedkey;
        	}
        	switch (cmd) {
      --- 577,582 ----
      ***************
      *** 604,610 ****
        	    if (t0 != ZLECMDCOUNT) {
        		lastnamed = t0;
        		statusline = NULL;
      - 		showinglist = 0;
        		return t0;
        	    }
        	    /* fall through */
      --- 603,608 ----
      *** 1.16	1995/07/21 22:15:06
      --- zle_tricky.c	1995/07/22 17:56:39
      ***************
      *** 3705,3710 ****
      --- 3705,3711 ----
        
            makearray(l);
            listmatches();
      +     showinglist = 0;
        
            expl = ex;
            amatches = am;

-----BEGIN PGP SIGNATURE-----
Version: 2.6.i

iQBVAgUBMBE/f2WJ8JfKi+e9AQEVXQH/aoOFjtGYTcvZAHTbVrKdForDMUGU5zim
kbagfOYSXwcdMeAwZi9JaxsuBxgx5I88CLfnqKM1JCA9F3deWEvxXA==
=dkSG
-----END PGP SIGNATURE-----



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