void
appendtag(Arg *arg)
{
- if(!sel)
+ Client *c = sel;
+
+ if(!c)
return;
- sel->tags[arg->i] = True;
+ c->tags[arg->i] = True;
arrange(NULL);
+ focus(c);
+ restack();
}
void
else
m++;
}
-
- n = 2 * (f + m);
+ if(!(n = 2 * (f + m))) {
+ drawstatus();
+ return;
+ }
if(nwins < n) {
nwins = n;
wins = erealloc(wins, nwins * sizeof(Window));