From ca80e91cd40658b5cee1afaf4c559cabf736e6fa Mon Sep 17 00:00:00 2001 From: sabetts Date: Mon, 2 Jun 2003 22:25:53 +0000 Subject: (group_completions): use a group's number if it has no name. --- src/actions.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/actions.c b/src/actions.c index b96a279..d3af66c 100644 --- a/src/actions.c +++ b/src/actions.c @@ -3351,7 +3351,16 @@ group_completions (char *str) struct sbuf *s; s = sbuf_new (0); - sbuf_copy (s, cur->name); + /* A group may not have a name, so if it doesn't, use it's + number. */ + if (cur->name) + { + sbuf_copy (s, cur->name); + } + else + { + sbuf_printf (s, "%d", cur->number); + } list_add_tail (&s->node, list); } -- cgit v1.2.3