summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/server-client.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2017-10-16 19:30:53 +0000
committernicm <nicm@openbsd.org>2017-10-16 19:30:53 +0000
commitd75a8bcf221a24f62f699b2c60d9d5e06de6ab21 (patch)
tree32f61e9c9d36b7f71def8aa72c803d936104c7b2 /usr.bin/tmux/server-client.c
parentdraft-ietf-tcpm-initcwnd was published as rfc 6928 (diff)
downloadwireguard-openbsd-d75a8bcf221a24f62f699b2c60d9d5e06de6ab21.tar.xz
wireguard-openbsd-d75a8bcf221a24f62f699b2c60d9d5e06de6ab21.zip
Infrastructure for drawing status lines of more than one line in height,
still only one is allowed but this lets tmux draw bigger ones.
Diffstat (limited to 'usr.bin/tmux/server-client.c')
-rw-r--r--usr.bin/tmux/server-client.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/usr.bin/tmux/server-client.c b/usr.bin/tmux/server-client.c
index 6f4b864ab01..4db6fc324d0 100644
--- a/usr.bin/tmux/server-client.c
+++ b/usr.bin/tmux/server-client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server-client.c,v 1.244 2017/09/06 07:12:41 nicm Exp $ */
+/* $OpenBSD: server-client.c,v 1.245 2017/10/16 19:30:53 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -1201,7 +1201,7 @@ server_client_reset_state(struct client *c)
struct window_pane *wp = w->active, *loop;
struct screen *s = wp->screen;
struct options *oo = c->session->options;
- int status, mode, o;
+ int lines, mode;
if (c->flags & (CLIENT_CONTROL|CLIENT_SUSPENDED))
return;
@@ -1209,13 +1209,14 @@ server_client_reset_state(struct client *c)
tty_region_off(&c->tty);
tty_margin_off(&c->tty);
- status = options_get_number(oo, "status");
- if (!window_pane_visible(wp) || wp->yoff + s->cy >= c->tty.sy - status)
+ if (status_at_line(c) != 0)
+ lines = 0;
+ else
+ lines = status_line_size(c->session);
+ if (!window_pane_visible(wp) || wp->yoff + s->cy >= c->tty.sy - lines)
tty_cursor(&c->tty, 0, 0);
- else {
- o = status && options_get_number(oo, "status-position") == 0;
- tty_cursor(&c->tty, wp->xoff + s->cx, o + wp->yoff + s->cy);
- }
+ else
+ tty_cursor(&c->tty, wp->xoff + s->cx, lines + wp->yoff + s->cy);
/*
* Set mouse mode if requested. To support dragging, always use button