Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: fixup describe-key-briefly for visual mode
- X-seq: zsh-workers 44976
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxx>
- Subject: PATCH: fixup describe-key-briefly for visual mode
- Date: Tue, 03 Dec 2019 09:48:20 +0100
- Authentication-results: amavisd4.gkg.net (amavisd-new); dkim=pass (2048-bit key) header.d=yahoo.co.uk
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <2566-1575362900.729167.ref@VoIY.B-xt.1-R2>
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