From: Simon Tatham Date: Sun, 28 Oct 2001 09:38:43 +0000 (+0000) Subject: Fix silly scrolling-vs-selection bug: if you selected text on line X-Git-Tag: 0.52~128 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=9bbe53d700501224d9db155875d0c8ddff3e54b7;p=PuTTY.git Fix silly scrolling-vs-selection bug: if you selected text on line 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] --- diff --git a/terminal.c b/terminal.c index 5cd4c17f..412f6b4e 100644 --- a/terminal.c +++ b/terminal.c @@ -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--;