mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 05:21:10 +00:00
Merge branch 'obsd-master'
This commit is contained in:
21
window.c
21
window.c
@ -632,6 +632,8 @@ window_add_pane(struct window *w, struct window_pane *other, int before,
|
||||
void
|
||||
window_lost_pane(struct window *w, struct window_pane *wp)
|
||||
{
|
||||
log_debug("%s: @%u pane %%%u", __func__, w->id, wp->id);
|
||||
|
||||
if (wp == marked_pane.wp)
|
||||
server_clear_marked();
|
||||
|
||||
@ -1292,23 +1294,18 @@ window_pane_key(struct window_pane *wp, struct client *c, struct session *s,
|
||||
}
|
||||
|
||||
int
|
||||
window_pane_outside(struct window_pane *wp)
|
||||
window_pane_visible(struct window_pane *wp)
|
||||
{
|
||||
struct window *w = wp->window;
|
||||
|
||||
if (wp->xoff >= w->sx || wp->yoff >= w->sy)
|
||||
return (1);
|
||||
if (wp->xoff + wp->sx > w->sx || wp->yoff + wp->sy > w->sy)
|
||||
return (1);
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
window_pane_visible(struct window_pane *wp)
|
||||
{
|
||||
if (wp->layout_cell == NULL)
|
||||
return (0);
|
||||
return (!window_pane_outside(wp));
|
||||
|
||||
if (wp->xoff >= w->sx || wp->yoff >= w->sy)
|
||||
return (0);
|
||||
if (wp->xoff + wp->sx > w->sx || wp->yoff + wp->sy > w->sy)
|
||||
return (0);
|
||||
return (1);
|
||||
}
|
||||
|
||||
u_int
|
||||
|
Reference in New Issue
Block a user