From 70729da988f92063a82dfbd04c8a960095af829c Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sat, 29 Mar 2003 13:54:11 +0000 Subject: [PATCH] Fix off-by-one in selection update while scrolling. Thanks Richard B. [originally from svn r3013] --- terminal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/terminal.c b/terminal.c index 67a738c1..a39a379d 100644 --- a/terminal.c +++ b/terminal.c @@ -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; } }