diff options
author | Thomas Adam <thomas@xteddy.org> | 2017-02-03 22:01:18 +0000 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2017-02-03 22:01:18 +0000 |
commit | e1c283325ecf6496f2107efc5c8d32257017558c (patch) | |
tree | f7bf71b1bd97b81f82c611aae5567310a9d28327 /status.c | |
parent | 6c333cc4864c11283704b069fa6477876fd48f70 (diff) | |
parent | 5e6a8177e55a8e30e0cd67c7ee3039aa22ff1c0e (diff) | |
download | rtmux-e1c283325ecf6496f2107efc5c8d32257017558c.tar.gz rtmux-e1c283325ecf6496f2107efc5c8d32257017558c.tar.bz2 rtmux-e1c283325ecf6496f2107efc5c8d32257017558c.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'status.c')
-rw-r--r-- | status.c | 19 |
1 files changed, 14 insertions, 5 deletions
@@ -192,17 +192,26 @@ status_timer_start_all(void) status_timer_start(c); } +/* Update status cache. */ +void +status_update_saved(struct session *s) +{ + if (!options_get_number(s->options, "status")) + s->statusat = -1; + else if (options_get_number(s->options, "status-position") == 0) + s->statusat = 0; + else + s->statusat = 1; +} + /* Get screen line of status line. -1 means off. */ int status_at_line(struct client *c) { struct session *s = c->session; - if (!options_get_number(s->options, "status")) - return (-1); - - if (options_get_number(s->options, "status-position") == 0) - return (0); + if (s->statusat != 1) + return (s->statusat); return (c->tty.sy - 1); } |