summaryrefslogtreecommitdiffstats
path: root/window-choose.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2012-08-14 09:17:14 +0000
committerNicholas Marriott <nicm@openbsd.org>2012-08-14 09:17:14 +0000
commita1e4908ed7d14c5b406541144017d57db4750c56 (patch)
tree1581599ccb8316e34c8a7c7e2a44643110e1c17e /window-choose.c
parentf61fc576d922b4eb3780933a7808d35bd3725917 (diff)
Boldify windows with alerts in choose-* list.
Diffstat (limited to 'window-choose.c')
-rw-r--r--window-choose.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/window-choose.c b/window-choose.c
index da4ab35a..99c09d52 100644
--- a/window-choose.c
+++ b/window-choose.c
@@ -152,6 +152,7 @@ window_choose_data_create(struct cmd_ctx *ctx)
wcd->ft = format_create();
wcd->ft_template = NULL;
wcd->command = NULL;
+ wcd->wl = NULL;
wcd->client = ctx->curclient;
wcd->session = ctx->curclient->session;
wcd->idx = -1;
@@ -444,6 +445,9 @@ window_choose_write_line(
screen_write_cursormove(ctx, 0, py);
if (data->top + py < ARRAY_LENGTH(&data->list)) {
item = &ARRAY_ITEM(&data->list, data->top + py);
+ if (item->wcd->wl != NULL &&
+ item->wcd->wl->flags & WINLINK_ALERTFLAGS)
+ gc.attr |= GRID_ATTR_BRIGHT;
screen_write_nputs(ctx, screen_size_x(s) - 1,
&gc, utf8flag, "(%*d) %s", data->width,
item->pos, item->name);
@@ -604,6 +608,7 @@ window_choose_add_window(struct window_pane *wp, struct cmd_ctx *ctx,
free(action_data);
wcd->idx = wl->idx;
+ wcd->wl = wl;
wcd->ft_template = xstrdup(template);
format_add(wcd->ft, "line", "%u", idx);
format_session(wcd->ft, s);