Browse Source

Disable rollover at edges on scroll

master
Arun Prakash Jana 4 years ago
parent
commit
6001eeb9a4
No known key found for this signature in database GPG Key ID: A75979F35C080412
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      src/nnn.c

+ 3
- 2
src/nnn.c View File

@@ -4303,13 +4303,14 @@ nochange:

#if NCURSES_MOUSE_VERSION > 1
/* Scroll up */
if (event.bstate == BUTTON4_PRESSED && ndents) {
if (event.bstate == BUTTON4_PRESSED && ndents && (cfg.rollover || cur)) {
move_cursor((cur + ndents - 1) % ndents, 0);
break;
}

/* Scroll down */
if (event.bstate == BUTTON5_PRESSED && ndents) {
if (event.bstate == BUTTON5_PRESSED && ndents
&& (cfg.rollover || (cur != ndents - 1))) {
move_cursor((cur + 1) % ndents, 0);
break;
}


Loading…
Cancel
Save