diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2012-01-29 09:37:03 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2012-01-29 09:37:03 +0000 |
commit | 4a96d6dfb62a58267d3ce34851e37e97aa3338ca (patch) | |
tree | 9ee015684b211fcc816b39f3decbd272bf45aa49 /usr.bin/tmux/status.c | |
parent | 0ea62aa939f3e8a6aebe45cd30d760e5f7a6616f (diff) |
Add an option to move the status line to the top of the screen,
requested by many.
Diffstat (limited to 'usr.bin/tmux/status.c')
-rw-r--r-- | usr.bin/tmux/status.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/usr.bin/tmux/status.c b/usr.bin/tmux/status.c index 8c5355edd40..22b6686499c 100644 --- a/usr.bin/tmux/status.c +++ b/usr.bin/tmux/status.c @@ -1,4 +1,4 @@ -/* $OpenBSD: status.c,v 1.86 2012/01/26 09:05:54 nicm Exp $ */ +/* $OpenBSD: status.c,v 1.87 2012/01/29 09:37:02 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -60,6 +60,20 @@ status_out_cmp(struct status_out *so1, struct status_out *so2) return (strcmp(so1->cmd, so2->cmd)); } +/* 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); +} + /* Retrieve options for left string. */ char * status_redraw_get_left(struct client *c, |