diff options
author | 2019-12-02 18:24:59 +0530 | |
---|---|---|
committer | 2019-12-02 18:24:59 +0530 | |
commit | 6001eeb9a47f963a07b0bd6559aa2b146588619c (patch) | |
tree | 55aac5d6ffd269bb132569dc12aa0412955800bb | |
parent | 3f0c604111ee8d16afaa26824cae5db070c30cff (diff) | |
download | nnn-6001eeb9a47f963a07b0bd6559aa2b146588619c.tar.gz |
Disable rollover at edges on scroll
-rw-r--r-- | src/nnn.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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; } |