~mdw
/
sgt
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix off-by-one in selection update while scrolling. Thanks Richard B.
[sgt/putty]
/
terminal.c
diff --git
a/terminal.c
b/terminal.c
index
67a738c
..
a39a379
100644
(file)
--- 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) {
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->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;
}
}
term->selend.x = 0;
}
}