summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/screen-write.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2017-11-03 17:02:33 +0000
committernicm <nicm@openbsd.org>2017-11-03 17:02:33 +0000
commit63c9949db5072e4063e65b31cd8a9e84b2b44aa1 (patch)
tree3160c8b5ff6d8e335d01d0df591daa6c69136ad3 /usr.bin/tmux/screen-write.c
parentRemove alternative implementations of GMX CAM setup logic (diff)
downloadwireguard-openbsd-63c9949db5072e4063e65b31cd8a9e84b2b44aa1.tar.xz
wireguard-openbsd-63c9949db5072e4063e65b31cd8a9e84b2b44aa1.zip
Support mouse on preview in tree mode.
Diffstat (limited to 'usr.bin/tmux/screen-write.c')
-rw-r--r--usr.bin/tmux/screen-write.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/tmux/screen-write.c b/usr.bin/tmux/screen-write.c
index 37373f03ccc..028ddcf5dac 100644
--- a/usr.bin/tmux/screen-write.c
+++ b/usr.bin/tmux/screen-write.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: screen-write.c,v 1.133 2017/11/02 22:00:42 nicm Exp $ */
+/* $OpenBSD: screen-write.c,v 1.134 2017/11/03 17:02:33 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -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)