]> Sergey Matveev's repositories - nnn.git/commitdiff
Fix build break
authorArun Prakash Jana <engineerarun@gmail.com>
Mon, 26 Apr 2021 02:01:15 +0000 (07:31 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Mon, 26 Apr 2021 02:01:15 +0000 (07:31 +0530)
src/nnn.c

index ddff97e0873a35beb99ad214b366935857ad23e1..9ab807c33c93ade0d959bbe989349ec2558f0647 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -6070,10 +6070,8 @@ nochange:
 #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;
                        }