ncspot icon indicating copy to clipboard operation
ncspot copied to clipboard

Mouse scroll doesn't work correctly

Open mhalano opened this issue 3 years ago • 13 comments

I'm using the ncspot 0.4.0 (installed via Snap) and on the lists (queue, search, etc) I can scroll up using the mouse wheel, but I couldn't scroll down. I can scroll down in the terminal normally.

mhalano avatar Feb 22 '21 12:02 mhalano

Hmm, can't reproduce this unfortunately. What terminal is this? Did you try other terminals?

hrkfdn avatar Mar 05 '21 23:03 hrkfdn

I tried with Tilix and also Gnome Terminal, using Bash and Zsh. Same problem on the four possibilites. This was done on Ubuntu 21.10. I also tried with Gnome Terminal with Bash on Ubuntu 20.04 LTS (just this combination on my other machine), the problem also occurs.

mhalano avatar Mar 06 '21 18:03 mhalano

This happens to me using Alacritty 0.7.2 on macOS 11.2.2, ncspot 0.4.0

DannyJJK avatar Mar 07 '21 15:03 DannyJJK

This was happening to me on Terminator on Ubuntu, as well.

Digging a bit, scrolling down with the mouse wheel produces a cursive_core::event::MouseEvent::Hold(cursive_core::event::MouseButton::Left) passed into ListView::on_event rather than a cursive_core::event::MouseEvent::WheelDown. This seems to be an issue stemming from cursive's pancurses backend not dealing with the legacy version of NCURSES_MOUSE_VERSION that Ubuntu uses, which encodes mouse wheel down events as what looks like a left mouse drag (see https://github.com/jeaye/ncurses-rs/issues/160 for more info). However, cursive's ncurses backend handles this situation properly (compare parse_mouse_event in the ncurses version and the pancurses version), so compiling with cursive/ncurses-backend fixes this for me.

Edit: Just tried the termion backend, scrolling down works there for me, too.

rbuch avatar Apr 11 '21 01:04 rbuch

This is now fixed in cursive as of https://github.com/gyscos/cursive/commit/3c7386dd50300c1ec7402d790f5ee5571bfff2ab.

rbuch avatar Apr 11 '21 18:04 rbuch

Having the same issue on macOS 11.5.1, tested in iTerm2 and Terminal using ncspot 0.8.1

imlukedewitt avatar Aug 18 '21 14:08 imlukedewitt

@imlukedewitt I think the problem was fixed in the dependency, as pointed by @rbuch, but it wasn't pulled to ncspot yet.

mhalano avatar Aug 18 '21 16:08 mhalano

I'm waiting for the version 0.8.2 to be released in Snap Store to update and check if the scroll problem remains.

mhalano avatar Aug 28 '21 21:08 mhalano

Hey :), there is no stable release containing this fix yet which is why it wasn't pulled in. Alternatively you could compile against one of the other working cursive backends.

hrkfdn avatar Aug 28 '21 23:08 hrkfdn

I tested the binary for 0.9.0 release and worked. Anyone could confirm so I can close this issue?

mhalano avatar Oct 20 '21 13:10 mhalano

I'm using Alacritty terminal, and scrolling up/down one step on my mouse wheel jumps over 2 items in ncspot.

Bettehem avatar Oct 20 '21 14:10 Bettehem

@mhalano I still can't scroll downwards, and the scroll does jump over 2 items, as @Bettehem said as well. ncspot 0.9.0 alacritty 0.9.0 (fed349a) macOS Monterey 12.0.1 (21A559) (it was an issue on macOS Big Sur as well.)

Not sure how the mouse wheel scroll is being determined, I imagine the "jumping over 2 items" might be related to the scroll speed? It would probably be better if it scrolled like GNU Nano does without mouse mode on, where it seems to emulate up/down keys (which in this case, would also do what we want it to do)

DannyJJK avatar Nov 16 '21 01:11 DannyJJK

@DannyJJK I also got the two lines problem.

mhalano avatar Nov 18 '21 23:11 mhalano