summaryrefslogtreecommitdiff
path: root/tag.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@10kloc.org>2006-09-05 09:37:45 +0200
committerAnselm R. Garbe <arg@10kloc.org>2006-09-05 09:37:45 +0200
commiteac04882b40595d724f4578b5acec5f22df570e3 (patch)
tree15da001ca70bb287f6571d63a036714179bd9df2 /tag.c
parent6499fc4f938eb7e61ab3e25df3904db9c890c693 (diff)
sanders toggletag patch is much more elegant
Diffstat (limited to 'tag.c')
-rw-r--r--tag.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tag.c b/tag.c
index 5337d254..9e997f9b 100644
--- a/tag.c
+++ b/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);
}