mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-22 06:38:37 -05:00
Selection point movement on scroll should move selanchor as well as
selstart and selend, otherwise all those worthy ideals go *foom* while the mouse buttons are held down. [originally from svn r1274]
This commit is contained in:
parent
f3a17c0715
commit
b4501dec57
11
terminal.c
11
terminal.c
@ -668,6 +668,10 @@ static void scroll(int topline, int botline, int lines, int sb)
|
|||||||
* of course, if the line _hasn't_ moved into the
|
* of course, if the line _hasn't_ moved into the
|
||||||
* scrollback then we don't do this, and cut them off
|
* scrollback then we don't do this, and cut them off
|
||||||
* at the top of the scroll region.
|
* at the top of the scroll region.
|
||||||
|
*
|
||||||
|
* This applies to selstart and selend (for an existing
|
||||||
|
* selection), and also selanchor (for one being
|
||||||
|
* selected as we speak).
|
||||||
*/
|
*/
|
||||||
seltop = sb ? -savelines : 0;
|
seltop = sb ? -savelines : 0;
|
||||||
|
|
||||||
@ -685,6 +689,13 @@ static void scroll(int topline, int botline, int lines, int sb)
|
|||||||
selend.x = 0;
|
selend.x = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (selanchor.y >= seltop && selanchor.y <= botline) {
|
||||||
|
selanchor.y--;
|
||||||
|
if (selanchor.y < seltop) {
|
||||||
|
selanchor.y = seltop;
|
||||||
|
selanchor.x = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
lines--;
|
lines--;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user