=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/status.c,v retrieving revision 1.160 retrieving revision 1.161 diff -c -r1.160 -r1.161 *** src/usr.bin/tmux/status.c 2017/02/03 11:57:27 1.160 --- src/usr.bin/tmux/status.c 2017/02/03 21:01:02 1.161 *************** *** 1,4 **** ! /* $OpenBSD: status.c,v 1.160 2017/02/03 11:57:27 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: status.c,v 1.161 2017/02/03 21:01:02 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 192,208 **** status_timer_start(c); } /* 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); return (c->tty.sy - 1); } --- 192,217 ---- 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 (s->statusat != 1) ! return (s->statusat); return (c->tty.sy - 1); }