aboutsummaryrefslogtreecommitdiff
path: root/status.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2012-01-29 12:57:01 +0000
committerTiago Cunha <tcunha@gmx.com>2012-01-29 12:57:01 +0000
commite4a7cefe0c1e9c61ea6c1510f67ce163cf25616e (patch)
tree1d51a3bcadbd4b16cb51f282cd5a003270d345df /status.c
parente23df3af5a57d28ba40b14db1ad6d62f0ee99940 (diff)
downloadrtmux-e4a7cefe0c1e9c61ea6c1510f67ce163cf25616e.tar.gz
rtmux-e4a7cefe0c1e9c61ea6c1510f67ce163cf25616e.tar.bz2
rtmux-e4a7cefe0c1e9c61ea6c1510f67ce163cf25616e.zip
Sync OpenBSD patchset 1015:
Add an option to move the status line to the top of the screen, requested by many.
Diffstat (limited to 'status.c')
-rw-r--r--status.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/status.c b/status.c
index 34d8f471..4df6745d 100644
--- a/status.c
+++ b/status.c
@@ -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,