]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Fix silly scrolling-vs-selection bug: if you selected text on line
authorSimon Tatham <anakin@pobox.com>
Sun, 28 Oct 2001 09:38:43 +0000 (09:38 +0000)
committerSimon Tatham <anakin@pobox.com>
Sun, 28 Oct 2001 09:38:43 +0000 (09:38 +0000)
9, then did ANSI Delete Line on line 10, the selection highlight
would move up a line even though it wasn't over any text that
actually moved. Easy to reproduce in the likes of vi. Trivial fix.

[originally from svn r1334]

terminal.c

index 5cd4c17f9312c0a3721b5399ca8ab924e627aec5..412f6b4e02df1367a4ed311a558c6325eb0a5e79 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--;