Fix silly scrolling-vs-selection bug: if you selected text on line
[u/mdw/putty] / terminal.c
index 5cd4c17..412f6b4 100644 (file)
@@ -676,7 +676,7 @@ static void scroll(int topline, int botline, int lines, int sb)
             * selection), and also selanchor (for one being
             * selected as we speak).
             */
-           seltop = sb ? -savelines : 0;
+           seltop = sb ? -savelines : topline;
 
            if (selstart.y >= seltop && selstart.y <= botline) {
                selstart.y--;