aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-09-26 06:24:11 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-09-26 06:24:11 +0530
commit52b413adae4beb5cee95c3c9f2949ae469051099 (patch)
tree58d7c15012df01432d348993223a31950b8a831f /src
parentccc25fd0f05ab07123998e6d8e70a4c8cd3e0021 (diff)
downloadnnn-52b413adae4beb5cee95c3c9f2949ae469051099.tar.gz
Fix lint error
Diffstat (limited to 'src')
-rw-r--r--src/nnn.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nnn.c b/src/nnn.c
index cdbb02b..e56a60f 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));