Skip to content
Snippets Groups Projects
Commit 095d3610 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Fix scrolling when there's no scrollbar.

The code was moving unscrolled lines back after scrolling the
majority of them... if all lines were scrolled, moving some back
actually broke scrolling.
parent 8ba254dd
No related branches found
No related tags found
No related merge requests found
Pipeline #7715 passed
......@@ -1392,11 +1392,18 @@ bitmap_movetext_screen(int x, int y, int tox, int toy, int direction, int height
if (screena.toprow < 0)
screena.toprow += screena.screenheight;
/*
* Set up to move bits that were *not* moved back to
* where they should have stayed.
*/
if (direction == -1)
direction = 1;
else
direction = -1;
height = vstat.rows - height;
// If everything was moved, there's no lines to move back
if (height <= y - toy)
return;
int otoy = toy;
toy = vstat.rows - (y - toy);
y = toy - (y - otoy);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment