Commit eac0488

Anselm R. Garbe <arg@10kloc.org>
2006-09-05 03:37:45
sanders toggletag patch is much more elegant
1 parent 6499fc4
Changed files (1)
tag.c
@@ -136,6 +136,6 @@ toggletag(Arg *arg)
 	for(i = 0; i < ntags && !sel->tags[i]; i++);
 	if(i == ntags)
 		sel->tags[arg->i] = True;
-	for(sel->weight = 0; sel->weight < ntags && !sel->tags[sel->weight]; sel->weight++);
+	sel->weight = (i == ntags) ? arg->i : i;
 	arrange(NULL);
 }