]> Sergey Matveev's repositories - nnn.git/commitdiff
Fix lint error
authorArun Prakash Jana <engineerarun@gmail.com>
Thu, 26 Sep 2019 00:54:11 +0000 (06:24 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Thu, 26 Sep 2019 00:54:11 +0000 (06:24 +0530)
src/nnn.c

index cdbb02b19407330cc589995cf0b6ee444a07367f..e56a60f6c38d26562a277f42ef3d9cf022ca72af 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -3202,9 +3202,8 @@ static void move_cursor(int target, int ignore_scrolloff)
                 * screen by allowing it to move inward and disallowing it to move
                 * outward (deeper into the scrolloff margin area).
                 */
-               if (cur < curscroll + scrolloff && delta < 0)
-                       curscroll += delta;
-               else if (cur > curscroll + onscreen - scrolloff - 1 && delta > 0)
+               if (((cur < (curscroll + scrolloff)) && delta < 0)
+                   || ((cur > (curscroll + onscreen - scrolloff - 1)) && delta > 0))
                        curscroll += delta;
        }
        curscroll = MIN(curscroll, MIN(cur, ndents - onscreen));