summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tabbed.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tabbed.c b/tabbed.c
index 6321575..ff3ada0 100644
--- a/tabbed.c
+++ b/tabbed.c
@@ -502,6 +502,9 @@ focusurgent(const Arg *arg)
{
int c;
+ if (sel < 0)
+ return;
+
for (c = (sel + 1) % nclients; c != sel; c = (c + 1) % nclients) {
if (clients[c]->urgent) {
focus(c);
@@ -785,11 +788,14 @@ movetab(const Arg *arg)
int c;
Client *new;
+ if (sel < 0)
+ return;
+
c = (sel + arg->i) % nclients;
if (c < 0)
c += nclients;
- if (sel < 0 || c == sel)
+ if (c == sel)
return;
new = clients[sel];