Fix !name case in tag and add default keybinds

This commit is contained in:
Martin Duquesnoy
2012-02-02 12:57:43 +01:00
parent 65c8c7a5ce
commit dff9738c24
2 changed files with 5 additions and 1 deletions

View File

@@ -30,7 +30,7 @@ tag_new(struct screen *s, char *name)
if((l = TAILQ_LAST(&s->tags, tsub)))
t->id = l->id + 1;
if(!strlen(name))
if(!name || !strlen(name))
xasprintf(&t->name, "%d", t->id + 1);
else
t->name = xstrdup(name);