Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot scroll with mouse wheel when mouse is enabled #63

Closed
mckellyln opened this issue Jun 16, 2018 · 4 comments
Closed

cannot scroll with mouse wheel when mouse is enabled #63

mckellyln opened this issue Jun 16, 2018 · 4 comments

Comments

@mckellyln
Copy link

mckellyln commented Jun 16, 2018

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

@mckellyln mckellyln changed the title cannot scroll with ouse wheel when mouse is enabled cannot scroll with mouse wheel when mouse is enabled Jun 16, 2018
@rgburke
Copy link
Owner

rgburke commented Jun 19, 2018

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.

@mckellyln
Copy link
Author

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.

@rgburke
Copy link
Owner

rgburke commented Jun 20, 2018

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.

@mckellyln
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants