summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/status.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/tmux/status.c')
-rw-r--r--usr.bin/tmux/status.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/usr.bin/tmux/status.c b/usr.bin/tmux/status.c
index 1507b4a63a8..e1590cfe7ca 100644
--- a/usr.bin/tmux/status.c
+++ b/usr.bin/tmux/status.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: status.c,v 1.78 2011/08/20 20:37:31 nicm Exp $ */
+/* $OpenBSD: status.c,v 1.79 2011/11/05 09:06:31 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -919,9 +919,16 @@ status_prompt_redraw(struct client *c)
off = 0;
memcpy(&gc, &grid_default_cell, sizeof gc);
- colour_set_fg(&gc, options_get_number(&s->options, "message-fg"));
- colour_set_bg(&gc, options_get_number(&s->options, "message-bg"));
- gc.attr |= options_get_number(&s->options, "message-attr");
+ /* Change colours for command mode. */
+ if (c->prompt_mdata.mode == 1) {
+ colour_set_fg(&gc, options_get_number(&s->options, "message-command-fg"));
+ colour_set_bg(&gc, options_get_number(&s->options, "message-command-bg"));
+ gc.attr |= options_get_number(&s->options, "message-command-attr");
+ } else {
+ colour_set_fg(&gc, options_get_number(&s->options, "message-fg"));
+ colour_set_bg(&gc, options_get_number(&s->options, "message-bg"));
+ gc.attr |= options_get_number(&s->options, "message-attr");
+ }
screen_write_start(&ctx, NULL, &c->status);
@@ -977,7 +984,12 @@ status_prompt_key(struct client *c, int key)
c->flags |= CLIENT_STATUS;
}
break;
+ case MODEKEYEDIT_SWITCHMODE:
+ c->flags |= CLIENT_STATUS;
+ break;
case MODEKEYEDIT_SWITCHMODEAPPEND:
+ c->flags |= CLIENT_STATUS;
+ /* FALLTHROUGH */
case MODEKEYEDIT_CURSORRIGHT:
if (c->prompt_index < size) {
c->prompt_index++;