diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-09-11 15:39:56 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-09-11 15:39:56 +0000 |
commit | d7738f748e236ab1d2d691e91c76276c12f00461 (patch) | |
tree | 88a8278f92f71e0b8f0fa03f39ce193e0ce3d223 /usr.bin/tmux | |
parent | 4fb68818c2fc8dfc1f8974426c45e15cfccb95af (diff) |
When resizing the copy mode screen, don't allow it to end up with the
viewable position beyond the size of the history.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r-- | usr.bin/tmux/window-copy.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/tmux/window-copy.c b/usr.bin/tmux/window-copy.c index c7ad610e28a..f4097c15e72 100644 --- a/usr.bin/tmux/window-copy.c +++ b/usr.bin/tmux/window-copy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window-copy.c,v 1.62 2010/09/08 20:36:42 nicm Exp $ */ +/* $OpenBSD: window-copy.c,v 1.63 2010/09/11 15:39:55 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -342,6 +342,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); |