walles / moar

Moar is a pager. It's designed to just do the right thing without any configuration.
Other
600 stars 17 forks source link

Mouse/Trackpad Scroll Support #16

Closed ron-wolf closed 4 years ago

ron-wolf commented 4 years ago

On macOS (Darwin), less allows using the mouse or trackpad to scroll up & down. However, this feature is not provided by moar. Do we have any insight on how this feature is implemented? Judging by the output of symbols $(which less), less uses the POSIX terminal interface (i.e., termios.h), since it mentions multiple functions from tcsetattr(3). This may indicate one potential implementation path.

walles commented 4 years ago

I'm developing this on a Mac, and I do have scroll wheel / trackpad support in moar, so I will need help understanding why it does not work for you.

Please try this:

  1. less /etc/passwd with a short enough window, verify that mouse scrolling works
  2. moar /etc/passwd in the same window, try mouse scrolling and note whether or not it works
  3. less /etc/passwd again, verify that mouse scrolling still works

If 1 and 3 works but not 2, then this seems to be an issue with moar.

What terminal are you using? I'm on iTerm2.

walles commented 4 years ago

Just released 0.9.12 which should fix this, @ron-wolf can you verify if it works for you?

ron-wolf commented 4 years ago

@walles Yes, it does! I do notice quite a bit more lag with moar, but it does indeed support mousewheel scrolling, amazing!