diff options
author | 2016-04-29 15:00:48 +0000 | |
---|---|---|
committer | 2016-04-29 15:00:48 +0000 | |
commit | bc3b19faf8c0a279e283433e2ae90152b2351585 (patch) | |
tree | 88b8443f41dc6f048d9ccaa300152d7cbd9fc55b /usr.bin/tmux/server-client.c | |
parent | Fix some gibbering horrors due to uninitialized struct nameidata's (diff) | |
download | wireguard-openbsd-bc3b19faf8c0a279e283433e2ae90152b2351585.tar.xz wireguard-openbsd-bc3b19faf8c0a279e283433e2ae90152b2351585.zip |
Add option to include status text in the pane borders. If
pane-border-status is set to "top" or "bottom" (rather than "off"),
every pane has a permanent top or bottom border containing the text from
pane-border-format.
Based on a diff sent long ago by Jonathan Slenders, mostly rewritten and
simplified by me.
Diffstat (limited to 'usr.bin/tmux/server-client.c')
-rw-r--r-- | usr.bin/tmux/server-client.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/usr.bin/tmux/server-client.c b/usr.bin/tmux/server-client.c index 5b6fef5833e..6a7fddbc4b1 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.184 2016/04/28 06:51:56 nicm Exp $ */ +/* $OpenBSD: server-client.c,v 1.185 2016/04/29 15:00:48 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -921,7 +921,7 @@ server_client_check_redraw(struct client *c) struct session *s = c->session; struct tty *tty = &c->tty; struct window_pane *wp; - int flags, redraw; + int flags, masked, redraw; if (c->flags & (CLIENT_CONTROL|CLIENT_SUSPENDED)) return; @@ -961,15 +961,15 @@ server_client_check_redraw(struct client *c) } } - if (c->flags & CLIENT_BORDERS) { + masked = c->flags & (CLIENT_BORDERS|CLIENT_STATUS); + if (masked != 0) tty_update_mode(tty, tty->mode, NULL); + if (masked == CLIENT_BORDERS) screen_redraw_screen(c, 0, 0, 1); - } - - if (c->flags & CLIENT_STATUS) { - tty_update_mode(tty, tty->mode, NULL); + else if (masked == CLIENT_STATUS) screen_redraw_screen(c, 0, 1, 0); - } + else if (masked != 0) + screen_redraw_screen(c, 0, 1, 1); tty->flags = (tty->flags & ~(TTY_FREEZE|TTY_NOCURSOR)) | flags; tty_update_mode(tty, tty->mode, NULL); |