about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/Zle/computil.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c
index db8a0eaa8..44685a7dd 100644
--- a/Src/Zle/computil.c
+++ b/Src/Zle/computil.c
@@ -760,10 +760,18 @@ parse_cadef(char *nam, char **args)
 		opt->name = ztrdup(rembslashcolon(name));
 		if (descr)
 		    opt->descr = ztrdup(descr);
-		else if (adpre && oargs && !oargs->next &&
-			 oargs->descr && oargs->descr[0])
-		    opt->descr = tricat(adpre, oargs->descr, adsuf);
-		else
+		else if (adpre && oargs && !oargs->next) {
+		    char *d;
+
+		    for (d = oargs->descr; *d; d++)
+			if (!iblank(*d))
+			    break;
+
+		    if (*d)
+			opt->descr = tricat(adpre, oargs->descr, adsuf);
+		    else
+			opt->descr = NULL;
+		} else
 		    opt->descr = NULL;
 		opt->xor = xor;
 		opt->type = otype;