src/nnn.c | 6 ++---- diff --git a/src/nnn.c b/src/nnn.c index ddff97e0873a35beb99ad214b366935857ad23e1..9ab807c33c93ade0d959bbe989349ec2558f0647 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -6070,10 +6070,8 @@ } #if NCURSES_MOUSE_VERSION > 1 /* Scroll up */ if (event.bstate == BUTTON4_PRESSED && ndents && (cfg.rollover || cur)) { - if (!cfg.rollover && cur < scroll_lines) - move_cursor(0, 0); - else - move_cursor((cur + ndents - scroll_lines) % ndents, 0); + move_cursor((!cfg.rollover && cur < scroll_lines + ? 0 : (cur + ndents - scroll_lines) % ndents), 0); break; }