rgburke/grv

cannot scroll with mouse wheel when mouse is enabled

mckellyln opened this issue · 4 comments

Hi,

When mouse is not enabled mouse wheel scroll works fine.
When mouse is enabled it works to select commit, etc. but the mouse scroll wheel no longer scrolls.
Is it possible to have both ?

GRV - Git Repository Viewer v0.1.3-111-g93dfe02 (compiled with go1.10.3 at 2018-06-15 22:49:53 EDT)

Ubuntu 16.04 +hwe - 4.13 kernel, zsh in tmux, TERM set to screen-256color

thx for grv,
-mark

Thanks for reporting this and sorry for the late response, I've been away for the last couple of days. Could you try the latest master and see if scrolling now works?

The issue is that NCurses was not providing any mouse data when scrolling down. So although a bit hacky, grv now interprets a mouse event without data as a scroll down. This fixes it on my system.

Hi,
Yes, latest master works for me as well. Thank you so much!
One sort of related issue - when I have:
set mouse true
set mouse-scroll-rows 1
It scrolls by 1 line with each wheel click.
But if I disable the mouse (just did that for testing) then scrolling rows changes to 3 per wheel click.
Not sure if that was always true or part of this but just wanted to let you know.

Thanks for confirming. When the mouse is disabled the number of rows scrolled is dependent on the terminal emulator you use. The terminal emulator translates a mouse scroll down into multiple <Down> key press events. For example, in my terminal when I scroll down grv receives 5 <Down> events and moves the cursor down 5 rows. So the mouse-scroll-rows configuration only takes effect when the mouse is enabled.

ok, thanks for explaining. Makes sense as my tmux is configured for 3 rows per wheel click.