summaryrefslogtreecommitdiffstats
path: root/tag.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tag.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tag.c b/tag.c
index dcda6dc..5337d25 100644
--- a/tag.c
+++ b/tag.c
@@ -106,8 +106,7 @@ settags(Client *c)
106 if(!matched) 106 if(!matched)
107 for(i = 0; i < ntags; i++) 107 for(i = 0; i < ntags; i++)
108 c->tags[i] = seltag[i]; 108 c->tags[i] = seltag[i];
109 for(i = 0; i < ntags && !c->tags[i]; i++); 109 for(c->weight = 0; c->weight < ntags && !c->tags[c->weight]; c->weight++);
110 c->weight = i;
111} 110}
112 111
113void 112void
@@ -121,6 +120,7 @@ tag(Arg *arg)
121 for(i = 0; i < ntags; i++) 120 for(i = 0; i < ntags; i++)
122 sel->tags[i] = False; 121 sel->tags[i] = False;
123 sel->tags[arg->i] = True; 122 sel->tags[arg->i] = True;
123 sel->weight = arg->i;
124 arrange(NULL); 124 arrange(NULL);
125} 125}
126 126
@@ -136,5 +136,6 @@ toggletag(Arg *arg)
136 for(i = 0; i < ntags && !sel->tags[i]; i++); 136 for(i = 0; i < ntags && !sel->tags[i]; i++);
137 if(i == ntags) 137 if(i == ntags)
138 sel->tags[arg->i] = True; 138 sel->tags[arg->i] = True;
139 for(sel->weight = 0; sel->weight < ntags && !sel->tags[sel->weight]; sel->weight++);
139 arrange(NULL); 140 arrange(NULL);
140} 141}