diff options
author | Tiago Cunha <tcunha@gmx.com> | 2009-07-20 15:57:05 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2009-07-20 15:57:05 +0000 |
commit | e8957009c7766fae83e892c3606b4d163db35b7e (patch) | |
tree | 9327dfeb71a8868bbd5a18305f95b70186834fc0 /status.c | |
parent | 62017452e958cd6fad19d5ca9c7eb56b63bf90a0 (diff) | |
download | rtmux-e8957009c7766fae83e892c3606b4d163db35b7e.tar.gz rtmux-e8957009c7766fae83e892c3606b4d163db35b7e.tar.bz2 rtmux-e8957009c7766fae83e892c3606b4d163db35b7e.zip |
Sync OpenBSD patchset 146:
New options, window-status-current-{fg,bg,attr}, to set the fg, bg and
attributes with which the current window is shown in the status line. From
Johan Friis, thanks.
Diffstat (limited to 'status.c')
-rw-r--r-- | status.c | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $Id: status.c,v 1.98 2009-07-17 18:32:54 tcunha Exp $ */ +/* $Id: status.c,v 1.99 2009-07-20 15:57:05 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -460,8 +460,18 @@ status_print(struct session *s, struct winlink *wl, struct grid_cell *gc) flag = ' '; if (wl == SLIST_FIRST(&s->lastw)) flag = '-'; - if (wl == s->curw) + if (wl == s->curw) { + fg = options_get_number(&wl->window->options, "window-status-current-fg"); + if (fg != 8) + gc->fg = fg; + bg = options_get_number(&wl->window->options, "window-status-current-bg"); + if (bg != 8) + gc->bg = bg; + attr = options_get_number(&wl->window->options, "window-status-current-attr"); + if (attr != 0) + gc->attr = attr; flag = '*'; + } if (session_alert_has(s, wl, WINDOW_ACTIVITY)) { flag = '#'; |