1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-04-10 15:48:06 -05:00

Fix off-by-one in selection update while scrolling. Thanks Richard B.

[originally from svn r3013]
This commit is contained in:
Simon Tatham 2003-03-29 13:54:11 +00:00
parent 8397d66359
commit 70729da988

View File

@ -769,14 +769,14 @@ static void scroll(Terminal *term, int topline, int botline, int lines, int sb)
if (term->selstart.y >= topline && term->selstart.y <= botline) {
term->selstart.y++;
if (term->selstart.y > botline) {
term->selstart.y = botline;
term->selstart.y = botline + 1;
term->selstart.x = 0;
}
}
if (term->selend.y >= topline && term->selend.y <= botline) {
term->selend.y++;
if (term->selend.y > botline) {
term->selend.y = botline;
term->selend.y = botline + 1;
term->selend.x = 0;
}
}