From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: Zsh workers <zsh-workers@zsh.org>
Subject: PATCH: fixup describe-key-briefly for visual mode
Date: Tue, 03 Dec 2019 09:48:20 +0100 [thread overview]
Message-ID: <2566-1575362900.729167@VoIY.B-xt.1-R2> (raw)
In-Reply-To: <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;
parent reply other threads:[~2019-12-03 8:49 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <2566-1575362900.729167.ref@VoIY.B-xt.1-R2>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2566-1575362900.729167@VoIY.B-xt.1-R2 \
--to=okiddle@yahoo.co.uk \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).