aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndreas Stallinger <astallinger@posteo.net>2019-10-07 00:08:40 +0200
committerHarry Jeffery <harry@exec64.co.uk>2019-10-17 21:13:12 +0100
commit0c0d26a8c19957075bcdae1319fa38cde584518c (patch)
treea9a862dda4b69ff8953eb45ec54386d6726cffb1 /src
parent94c95641b6d8de383257f65d36b0ed4b15c5fbef (diff)
downloadimv-0c0d26a8c19957075bcdae1319fa38cde584518c.tar.gz
navigator relative fix
move from % to division rem since higher numbers for prev failed i have "<Shift+P> prev 10" in my configs which was not working properly
Diffstat (limited to 'src')
-rw-r--r--src/navigator.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/navigator.c b/src/navigator.c
index 6b77643..c2a5f5f 100644
--- a/src/navigator.c
+++ b/src/navigator.c
@@ -133,9 +133,9 @@ void imv_navigator_select_rel(struct imv_navigator *nav, ssize_t direction)
}
if (direction > 1) {
- direction = direction % nav->paths->len;
+ direction = div(direction, nav->paths->len).rem;
} else if (direction < -1) {
- direction = direction % nav->paths->len;
+ direction = div(direction, nav->paths->len).rem;
} else if (direction == 0) {
return;
}