diff --git a/window-copy.c b/window-copy.c index bb0e81c5..5e04f34e 100644 --- a/window-copy.c +++ b/window-copy.c @@ -340,6 +340,8 @@ window_copy_resize(struct window_pane *wp, u_int sx, u_int sy) data->cy = sy - 1; if (data->cx > sx) data->cx = sx; + if (data->oy > screen_hsize(data->backing)) + data->oy = screen_hsize(data->backing); window_copy_clear_selection(wp);