aboutsummaryrefslogtreecommitdiff
path: root/window.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2020-02-14 16:01:26 +0000
committerThomas Adam <thomas@xteddy.org>2020-02-14 16:01:26 +0000
commitc391d50cbb79407be95204a41713f0ab66fbc7e6 (patch)
tree6372e718dbdb1d1addb3fa8b94ca5894230c98be /window.c
parent9900ccd04ee5204b3ce0fcf375daa1f3c6686ede (diff)
parent58b47bf01b4136a7f90cb6852b0ecb1b414e4494 (diff)
downloadrtmux-c391d50cbb79407be95204a41713f0ab66fbc7e6.tar.gz
rtmux-c391d50cbb79407be95204a41713f0ab66fbc7e6.tar.bz2
rtmux-c391d50cbb79407be95204a41713f0ab66fbc7e6.zip
Merge branch 'obsd-master'
Diffstat (limited to 'window.c')
-rw-r--r--window.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/window.c b/window.c
index 015738c9..f911f186 100644
--- a/window.c
+++ b/window.c
@@ -548,31 +548,38 @@ window_get_active_at(struct window *w, u_int x, u_int y)
struct window_pane *
window_find_string(struct window *w, const char *s)
{
- u_int x, y;
+ u_int x, y, top = 0, bottom = w->sy - 1;
+ int status;
x = w->sx / 2;
y = w->sy / 2;
+ status = options_get_number(w->options, "pane-border-status");
+ if (status == PANE_STATUS_TOP)
+ top++;
+ else if (status == PANE_STATUS_BOTTOM)
+ bottom--;
+
if (strcasecmp(s, "top") == 0)
- y = 0;
+ y = top;
else if (strcasecmp(s, "bottom") == 0)
- y = w->sy - 1;
+ y = bottom;
else if (strcasecmp(s, "left") == 0)
x = 0;
else if (strcasecmp(s, "right") == 0)
x = w->sx - 1;
else if (strcasecmp(s, "top-left") == 0) {
x = 0;
- y = 0;
+ y = top;
} else if (strcasecmp(s, "top-right") == 0) {
x = w->sx - 1;
- y = 0;
+ y = top;
} else if (strcasecmp(s, "bottom-left") == 0) {
x = 0;
- y = w->sy - 1;
+ y = bottom;
} else if (strcasecmp(s, "bottom-right") == 0) {
x = w->sx - 1;
- y = w->sy - 1;
+ y = bottom;
} else
return (NULL);