nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 3d727266c35679132f856a5aa9276baf2ae383d7
parent 4673e709b2b04e32db3a9c6cc561db04b0a517b1
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sun, 25 Feb 2024 16:14:44 +0100

input: for one bump of the mousewheel scroll two lines, not three

Scrolling three lines at a time goes too fast: it feels erratic.
Whereas scrolling two lines at a time still feels like scrolling.

Diffstat:
Msrc/winio.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/winio.c b/src/winio.c @@ -1686,9 +1686,9 @@ int get_mouseinput(int *mouse_y, int *mouse_x, bool allow_shortcuts) if (in_middle || (in_footer && *mouse_y == 0)) { int keycode = (event.bstate & BUTTON4_PRESSED) ? ALT_UP : ALT_DOWN; - /* One roll of the mouse wheel should scroll three lines. */ - for (int count = 3; count > 0; count--) - put_back(keycode); + /* One bump of the mouse wheel should scroll two lines. */ + put_back(keycode); + put_back(keycode); return 1; } else