]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Fix off-by-one in selection update while scrolling. Thanks Richard B.
authorSimon Tatham <anakin@pobox.com>
Sat, 29 Mar 2003 13:54:11 +0000 (13:54 +0000)
committerSimon Tatham <anakin@pobox.com>
Sat, 29 Mar 2003 13:54:11 +0000 (13:54 +0000)
[originally from svn r3013]

terminal.c

index 67a738c1a08430cff44d47efb60b04dfc5a893fc..a39a379d80ea047ec10dfe51b3842edc11be1bed 100644 (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;
                }
            }