Skip to content

Commit

Permalink
Style fix
Browse files Browse the repository at this point in the history
  • Loading branch information
leovilok committed Sep 29, 2020
1 parent d1d4c4a commit 6067a91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/nnn.c
Original file line number Diff line number Diff line change
Expand Up @@ -5973,7 +5973,7 @@ static bool browse(char *ipath, const char *session, int pkey)
#if NCURSES_MOUSE_VERSION > 1
/* Scroll up */
if (event.bstate == BUTTON4_PRESSED && ndents && (cfg.rollover || cur)) {
if(!cfg.rollover && cur < scroll_lines)
if (!cfg.rollover && cur < scroll_lines)
move_cursor(0,0);
else
move_cursor((cur + ndents - scroll_lines) % ndents, 0);
Expand All @@ -5983,7 +5983,7 @@ static bool browse(char *ipath, const char *session, int pkey)
/* Scroll down */
if (event.bstate == BUTTON5_PRESSED && ndents
&& (cfg.rollover || (cur != ndents - 1))) {
if(!cfg.rollover && cur >= ndents - scroll_lines)
if (!cfg.rollover && cur >= ndents - scroll_lines)
move_cursor(ndents-1, 0);
else
move_cursor((cur + scroll_lines) % ndents, 0);
Expand Down

0 comments on commit 6067a91

Please sign in to comment.