summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Src/Zle/complist.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 2c11f7081..cc1caff26 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2025-02-12 Bart Schaefer <schaefer@zsh.org>
+ * 53360: Src/Zle/complist.c: domenuselect() fails if the previous
+ completion did not generate a list (fix for segfault)
+
* 53346 (cf. 53350): Util/helpfiles: fix use of "man" on file paths
* 53348: Doc/Zsh/builtins.yo, Src/builtin.c, Test/K01nameref.ztst:
diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c
index 5619160a9..091ad03b1 100644
--- a/Src/Zle/complist.c
+++ b/Src/Zle/complist.c
@@ -2391,6 +2391,9 @@ domenuselect(Hookdef dummy, Chdata dat)
char *s;
char status[MAX_STATUS], *modeline = NULL;
+ if (! hasoldlist)
+ return 2;
+
msearchstack = NULL;
msearchstr = "";
msearchstate = MS_OK;