mirror of
https://github.com/tmux/tmux.git
synced 2024-11-05 02:18:47 +00:00
Sync OpenBSD patchset 760:
When resizing the copy mode screen, don't allow it to end up with the viewable position beyond the size of the history.
This commit is contained in:
parent
fe3621cbc5
commit
59dc08a7a0
@ -1,4 +1,4 @@
|
||||
/* $Id: window-copy.c,v 1.123 2010-09-10 13:34:12 tcunha Exp $ */
|
||||
/* $Id: window-copy.c,v 1.124 2010-09-18 15:41:18 tcunha 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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user