diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/navigator.c | 4 |
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; } |