diff options
author | Thomas Adam <thomas@xteddy.org> | 2017-10-20 12:36:29 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2017-10-20 12:36:29 +0100 |
commit | 31901e3c07ca3f4e51ab504aa2d752f614e761be (patch) | |
tree | 4ba325087795c2fd089c14bbc095b6b5db75b19f /server-client.c | |
parent | a34de2e378e0cff7191a426117f44e8b81543445 (diff) | |
parent | 2f6935a630507351233d6296cc6ec9a08d6a702a (diff) | |
download | rtmux-31901e3c07ca3f4e51ab504aa2d752f614e761be.tar.gz rtmux-31901e3c07ca3f4e51ab504aa2d752f614e761be.tar.bz2 rtmux-31901e3c07ca3f4e51ab504aa2d752f614e761be.zip |
Merge branch 'obsd-master'
Conflicts:
server-fn.c
Diffstat (limited to 'server-client.c')
-rw-r--r-- | server-client.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/server-client.c b/server-client.c index 37b648c8..775c90a6 100644 --- a/server-client.c +++ b/server-client.c @@ -1211,7 +1211,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; @@ -1219,13 +1219,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 |