JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
hotfix of a serious crashing bug
[dwm.git] / view.c
diff --git a/view.c b/view.c
index c11e349..baa2ac6 100644 (file)
--- a/view.c
+++ b/view.c
@@ -233,17 +233,9 @@ view(Arg *arg) {
        unsigned int i;
 
        for(i = 0; i < ntags; i++)
-               seltag[i] = False;
-       seltag[arg->i] = True;
-       arrange();
-}
-
-void
-viewall(Arg *arg) {
-       unsigned int i;
-
-       for(i = 0; i < ntags; i++)
-               seltag[i] = True;
+               seltag[i] = (arg->i == -1) ? True : False;
+       if(arg->i >= 0 && arg->i < ntags)
+               seltag[arg->i] = True;
        arrange();
 }