summaryrefslogtreecommitdiff
path: root/tabbed/patches/tabbed-move-clamped-20200404-e2ca5f9.diff
diff options
context:
space:
mode:
Diffstat (limited to 'tabbed/patches/tabbed-move-clamped-20200404-e2ca5f9.diff')
-rw-r--r--tabbed/patches/tabbed-move-clamped-20200404-e2ca5f9.diff19
1 files changed, 19 insertions, 0 deletions
diff --git a/tabbed/patches/tabbed-move-clamped-20200404-e2ca5f9.diff b/tabbed/patches/tabbed-move-clamped-20200404-e2ca5f9.diff
new file mode 100644
index 0000000..b62f0e9
--- /dev/null
+++ b/tabbed/patches/tabbed-move-clamped-20200404-e2ca5f9.diff
@@ -0,0 +1,19 @@
+diff --git a/tabbed.c b/tabbed.c
+index eafe28a..e2ca5f9 100644
+--- a/tabbed.c
++++ b/tabbed.c
+@@ -787,8 +787,12 @@ maprequest(const XEvent *e)
+ void
+ move(const Arg *arg)
+ {
+- if (arg->i >= 0 && arg->i < nclients)
+- focus(arg->i);
++ int i;
++
++ i = arg->i < nclients ? arg->i : nclients - 1;
++
++ if (i >= 0)
++ focus(i);
+ }
+
+ void