neovim-qt icon indicating copy to clipboard operation
neovim-qt copied to clipboard

Scroll bar does not work if the cursor is on the first line

Open X-m7 opened this issue 2 years ago • 3 comments

If I open a file and immediately drag the scrollbar down the view does not actually change, I have to either scroll with my mouse wheel/touchpad or move the cursor down first, then the scrollbar will work as expected. However, if I move the cursor back to the first line afterwards the scroll bar stops working again.

I am using Neovim-Qt version 0.2.16.1 with Neovim 0.7.0 on Arch Linux.

X-m7 avatar May 15 '22 06:05 X-m7

@X-m7 I have the same problem on Windows 10. Could it be a configuration or plugin issue? Have you found a workaround?

qis avatar May 28 '22 21:05 qis

@X-m7 I have the same problem on Windows 10. Could it be a configuration or plugin issue? Have you found a workaround?

I tried moving the contents of the ~/.config/nvim folder elsewhere to simulate a clean setup, then enabled the scroll bar using the :GuiScrollBar 1 command, and the issue still occurs, and I don't use any plugins either.

I did just notice that the issue isn't just for the first time a file is opened, it's whenever the cursor is on the first line.

X-m7 avatar May 28 '22 23:05 X-m7

Confirmed here, the cause is still unknown. From what I've seen so far:

  1. the handleValueChanged slot is fired with a positive value (e.g. value = 20 leads to a delta of -20) this looks ok
  2. a call is issued to nvim to scroll down normal! %1\005 where %1 is the delta and \005 is Ctrl-e

Manually pressing 20<C-e> in normal mode does have the intended effect even when the cursor is in the first line.

equalsraf avatar Jul 12 '23 23:07 equalsraf