From: Arun Prakash Jana Date: Thu, 26 Sep 2019 00:54:11 +0000 (+0530) Subject: Fix lint error X-Git-Tag: v2.7~63 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=52b413adae4beb5cee95c3c9f2949ae469051099;p=nnn.git Fix lint error --- diff --git a/src/nnn.c b/src/nnn.c index cdbb02b1..e56a60f6 100644 --- 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));