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

A fix for Zefram's recent patches



After applying Zefram's input patches and the other patch to keep the
completion list visible (articles 145 and 151), try a where-is zle-command,
and use TAB to get a list of completions in the minibuffer, then type in any
valid command and hit return. You'll get SEGV. The other problem is when you
do not get SEGV (when you did not use TAB or the completion was unique), but
you used where-is from menu completion, the menu will immediately overwrite
the output of where-is before you can read it. The same for
describe-key-briefly. I fixed this by removing the ZLE_MENUCOMP flag from
where-is and describe-key-briefly. I know that it would be logical for these
commands not to terminate menu completion, but to implement it some more code
would be neccessary to show both the completion list and the result from these
commands.

I fixed the other bug by resetting showinglist to zero on exit from
executenamedcommand. These fixes are probably interconnected so I send them
together.

Bye,
   Zoltan

rcsdiff -qc -kk -r1.4 -r1.5 Src/zle_bindings.c
*** Src/zle_bindings.c
--- Src/zle_bindings.c	1995/07/08 14:51:58
***************
*** 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},
--- 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},
rcsdiff -qc -kk -r1.4 -r1.5 Src/zle_misc.c
*** Src/zle_misc.c
--- Src/zle_misc.c	1995/07/08 14:51:58
***************
*** 553,558 ****
--- 553,559 ----
  	*ptr = '\0';
  	if ((cmd = getkeycmd()) < 0 || cmd == z_sendbreak) {
  	    statusline = NULL;
+ 	    showinglist = 0;
  	    return z_undefinedkey;
  	}
  	switch (cmd) {
***************
*** 579,584 ****
--- 580,586 ----
  	    if (t0 != ZLECMDCOUNT) {
  		lastnamed = t0;
  		statusline = NULL;
+ 		showinglist = 0;
  		return t0;
  	    }
  	    /* fall through */



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