summaryrefslogtreecommitdiffstats
path: root/screen-write.c
diff options
context:
space:
mode:
authornicm <nicm>2017-11-03 17:02:33 +0000
committernicm <nicm>2017-11-03 17:02:33 +0000
commit50a5f84cb4accf806dea2235ca8d3749b107aac8 (patch)
tree4b385f0816915a783b911680d6ec141652023ad7 /screen-write.c
parentba93a647f1b59d85340f9708ee2ae4fb6f201a64 (diff)
Support mouse on preview in tree mode.
Diffstat (limited to 'screen-write.c')
-rw-r--r--screen-write.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/screen-write.c b/screen-write.c
index 44c28982..5ab472bd 100644
--- a/screen-write.c
+++ b/screen-write.c
@@ -403,6 +403,8 @@ screen_write_fast_copy(struct screen_write_ctx *ctx, struct screen *src,
cy = s->cy;
for (yy = py; yy < py + ny; yy++) {
+ if (yy >= gd->hsize + gd->sy)
+ break;
cx = s->cx;
for (xx = px; xx < px + nx; xx++) {
if (xx >= gd->linedata[yy].cellsize)