=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/tty.c,v retrieving revision 1.303 retrieving revision 1.304 diff -u -r1.303 -r1.304 --- src/usr.bin/tmux/tty.c 2018/07/04 09:44:07 1.303 +++ src/usr.bin/tmux/tty.c 2018/08/18 16:14:03 1.304 @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.303 2018/07/04 09:44:07 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.304 2018/08/18 16:14:03 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -696,6 +696,21 @@ } if (n != 0) tty_putn(tty, s, n, n); +} + +/* How many lines are taken up by the status line on this client? */ +u_int +tty_status_lines(struct client *c) +{ + u_int lines; + + if (c->flags & CLIENT_STATUSOFF) + lines = 0; + else + lines = status_line_size(c->session); + if (c->message_string != NULL || c->prompt_string != NULL) + lines = (lines == 0) ? 1 : lines; + return (lines); } /*