summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsabetts <sabetts>2003-06-02 22:25:53 +0000
committersabetts <sabetts>2003-06-02 22:25:53 +0000
commitca80e91cd40658b5cee1afaf4c559cabf736e6fa (patch)
tree08e0cb49bc32a4b4b962666ba630f85abb2e7d73
parent6945f4a9e5027303a81fefe9e88d14a9ed441370 (diff)
downloadratpoison-ca80e91cd40658b5cee1afaf4c559cabf736e6fa.zip
(group_completions): use a group's number if it
has no name.
-rw-r--r--ChangeLog5
-rw-r--r--src/actions.c11
2 files changed, 15 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index ab4236c..cabd99a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-06-02 Shawn Betts <sabetts@sfu.ca>
+
+ * src/actions.c (group_completions): use a group's number if it
+ has no name.
+
2003-05-31 Shawn Betts <sabetts@sfu.ca>
* configure.in: check for usleep
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);
}