sanders toggletag patch is much more elegant eac04882
Anselm R. Garbe · 2006-09-05 09:37 1 file(s) · +1 −1
tag.c +1 −1
136 136
	for(i = 0; i < ntags && !sel->tags[i]; i++);
137 137
	if(i == ntags)
138 138
		sel->tags[arg->i] = True;
139 -
	for(sel->weight = 0; sel->weight < ntags && !sel->tags[sel->weight]; sel->weight++);
139 +
	sel->weight = (i == ntags) ? arg->i : i;
140 140
	arrange(NULL);
141 141
}