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

PATCH: fixup describe-key-briefly for visual mode



The following fixes the describe-key-briefly widget to work from vi
visual mode. It also doesn't work right from menuselect, isearch etc but
fixing that is more involved.

Oliver

diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c
index 22c12cf1f..27dc8ef21 100644
--- a/Src/Zle/zle_main.c
+++ b/Src/Zle/zle_main.c
@@ -1878,13 +1878,17 @@ describekeybriefly(UNUSED(char **args))
 {
     char *seq, *str, *msg, *is;
     Thingy func;
+    Keymap km;
 
     if (statusline)
 	return 1;
     clearlist = 1;
     statusline = "Describe key briefly: _";
     zrefresh();
+    if (invicmdmode() && region_active && (km = openkeymap("visual")))
+        selectlocalmap(km);
     seq = getkeymapcmd(curkeymap, &func, &str);
+    selectlocalmap(NULL);
     statusline = NULL;
     if(!*seq)
 	return 1;



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