[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Gavin D. Smith |
Date: |
Sun, 28 Jan 2024 11:12:21 -0500 (EST) |
branch: master
commit 564009e71332b0a5973d15828e2a9b08d98b704b
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Sun Jan 28 16:12:12 2024 +0000
* info/infodoc.c (describe_key): Fix handling of keys with
"invalid" mappings.
Report from Bugsy Abatantuono <bugsyabatantuono@proton.me>.
---
ChangeLog | 7 +++++++
info/infodoc.c | 3 ++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 2dce139a27..ddde1168ec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-01-28 Gavin Smith <gavinsmith0123@gmail.com>
+
+ * info/infodoc.c (describe_key): Fix handling of keys with
+ "invalid" mappings.
+
+ Report from Bugsy Abatantuono <bugsyabatantuono@proton.me>.
+
2024-01-28 Gavin Smith <gavinsmith0123@gmail.com>
* info/doc.h (FUNCTION_DOC, InfoCommand): Use "InfoCommand" as
diff --git a/info/infodoc.c b/info/infodoc.c
index f115ab7062..5bad4e8869 100644
--- a/info/infodoc.c
+++ b/info/infodoc.c
@@ -466,7 +466,8 @@ DECLARE_INFO_COMMAND (describe_key, _("Print documentation
for KEY"))
*k++ = keystroke;
*k = '\0';
- if (map[keystroke].value.function == NULL)
+ if (!map[keystroke].value.function
+ || !map[keystroke].value.function->func) /* "invalid" mapping */
{
message_in_echo_area (_("%s is undefined"), pretty_keyseq (keys));
return;