summaryrefslogtreecommitdiffstats
path: root/window.c
diff options
context:
space:
mode:
authornicm <nicm>2017-08-28 12:36:38 +0000
committernicm <nicm>2017-08-28 12:36:38 +0000
commitfe4467ad2bf7b37a12330ed0a147e7230d60179a (patch)
treee784bfc89adead217255a618cb875922e8e9264a /window.c
parentfccfc4e4bed37b42c80797178621fe0d28c2f33b (diff)
Do not forbid targets to specify non-visible panes - the checks for
visibility are better where the target is used. GitHub issue 1049.
Diffstat (limited to 'window.c')
-rw-r--r--window.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/window.c b/window.c
index f08e35ab..1c97fb8d 100644
--- a/window.c
+++ b/window.c
@@ -634,6 +634,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();
@@ -1279,23 +1281,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->layout_cell == NULL)
+ return (0);
+
if (wp->xoff >= w->sx || wp->yoff >= w->sy)
- return (1);
+ return (0);
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));
+ return (1);
}
u_int