summaryrefslogtreecommitdiff
path: root/tabbed/patches/tabbed-move-clamped-20200404-e2ca5f9.diff
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-02-09 16:47:34 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-02-09 16:47:34 +0900
commit7b4b09db1548e6bb6bc60ca64968b24dc2996967 (patch)
tree5052e88384bcfc2da3b207de1ac4cdcb7a8a2245 /tabbed/patches/tabbed-move-clamped-20200404-e2ca5f9.diff
parent28729f1f7e4cdef4534d969733b9178cd689418e (diff)
created tabbed/
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