Alexey-T / CudaText

Cross-platform text editor, written in Free Pascal
Mozilla Public License 2.0
2.4k stars 168 forks source link

Viewer: down arrow button in scrollbar doesn't work #5599

Closed pintassilgo closed 4 days ago

pintassilgo commented 4 days ago

At least for me, Cuda Qt5 under KDE Plasma.

If I open a small scrollable file, the up arrow button on scrollbar to scroll up a single line works, but the down arrow button does nothing.

Alexey-T commented 4 days ago

confimed.

Alexey-T commented 4 days ago

seems fixed. cudatext.xz.zip

pintassilgo commented 4 days ago

Fixed, thanks, but I still got a failed case.

The giant file (13GB).

  1. Scroll to the very bottom.
  2. Click up button a few times. Will scroll up line by line as expected.
  3. Now you are a few lines above the bottom. Click down button just once. The first click will scroll to the last line. Bug.
pintassilgo commented 4 days ago

Just a bit more info:

This new issue above is only reproducible while the amount of lines scrolled up is not enough to move the thumb. As long as the thumb is touching the down arrow key, clicking this button scrolls all the way down to the last line.

If I drag the thumb up, even if by only 1px, creating a 1px gap between thumb and down arrow button, then down arrow button works as expected (scrolling a single line).

So in order to test this issue you need a file big enough that you can scroll a few lines while the thumb stands still.

Alexey-T commented 4 days ago

reproduced. made this 1Gb log file for test by script:

f = open('/home/user/log', 'w')
for i in range(1*1000*1000*100):
    f.write('line '+str(i)+'\n')
Alexey-T commented 4 days ago

it is caused by Qt5. procedure TATBinHex.WMVScrol is called by Qt,

Alexey-T commented 4 days ago

beta with workaround

cudatext.xz.zip

pintassilgo commented 4 days ago

Fixed, thanks.