zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: fixup describe-key-briefly for visual mode
       [not found] <2566-1575362900.729167.ref@VoIY.B-xt.1-R2>
@ 2019-12-03  8:48 ` Oliver Kiddle
  0 siblings, 0 replies; only message in thread
From: Oliver Kiddle @ 2019-12-03  8:48 UTC (permalink / raw)
  To: Zsh workers

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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-12-03  8:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <2566-1575362900.729167.ref@VoIY.B-xt.1-R2>
2019-12-03  8:48 ` PATCH: fixup describe-key-briefly for visual mode Oliver Kiddle

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