commit 6015adfa2aea621f38dbfe2bafdc1ddb6baefa08
parent ebbc476adb217efd5a200b596445c0566982f533
Author: Anselm R. Garbe <garbeam@wmii.de>
Date: Wed, 8 Mar 2006 22:55:10 +0100
~ is dropped in /tags creation
Diffstat:
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/cmd/wm/tag.c b/cmd/wm/tag.c
@@ -210,6 +210,7 @@ update_ctags()
unsigned int i, j, k;
char buf[256];
char *tags[128];
+ char *t;
fprintf(stderr, "%s", "update_ctags\n");
for(i = 0; i < nctag; i++) {
@@ -222,8 +223,11 @@ update_ctags()
cext_strlcpy(buf, client[i]->tags, sizeof(buf));
j = cext_tokenize(tags, 128, buf, ' ');
for(k = 0; k < j; k++) {
- if(!has_ctag(tags[k])) {
- ctag = (char **)cext_array_attach((void **)ctag, strdup(tags[k]),
+ t = tags[k];
+ if(*t == '~')
+ t++;
+ if(!has_ctag(t)) {
+ ctag = (char **)cext_array_attach((void **)ctag, strdup(t),
sizeof(char *), &ctagsz);
nctag++;
}