Revision: 2632 http://tmux.svn.sourceforge.net/tmux/?rev=2632&view=rev Author: tcunha Date: 2011-11-10 21:40:17 +0000 (Thu, 10 Nov 2011) Log Message: ----------- Sync OpenBSD patchset 976:
Option to change status line (message) background when using vi keys and in command mode. From Ben Boeckel. Modified Paths: -------------- trunk/options-table.c trunk/status.c trunk/tmux.1 Modified: trunk/options-table.c =================================================================== --- trunk/options-table.c 2011-11-09 12:00:11 UTC (rev 2631) +++ trunk/options-table.c 2011-11-10 21:40:17 UTC (rev 2632) @@ -193,6 +193,21 @@ .default_num = 3 }, + { .name = "message-command-attr", + .type = OPTIONS_TABLE_ATTRIBUTES, + .default_num = 0 + }, + + { .name = "message-command-bg", + .type = OPTIONS_TABLE_COLOUR, + .default_num = 0 + }, + + { .name = "message-command-fg", + .type = OPTIONS_TABLE_COLOUR, + .default_num = 3 + }, + { .name = "message-fg", .type = OPTIONS_TABLE_COLOUR, .default_num = 0 Modified: trunk/status.c =================================================================== --- trunk/status.c 2011-11-09 12:00:11 UTC (rev 2631) +++ trunk/status.c 2011-11-10 21:40:17 UTC (rev 2632) @@ -919,9 +919,16 @@ 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 @@ 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++; Modified: trunk/tmux.1 =================================================================== --- trunk/tmux.1 2011-11-09 12:00:11 UTC (rev 2631) +++ trunk/tmux.1 2011-11-10 21:40:17 UTC (rev 2632) @@ -14,7 +14,7 @@ .\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING .\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: October 27 2011 $ +.Dd $Mdocdate: November 5 2011 $ .Dt TMUX 1 .Os .Sh NAME @@ -1971,6 +1971,12 @@ or a hexadecimal RGB string such as .Ql #ffffff , which chooses the closest match from the default 256-colour set. +.It Ic message-command-attr Ar attributes +Set status line message attributes when in command mode. +.It Ic message-command-bg Ar colour +Set status line message background colour when in command mode. +.It Ic message-command-fg Ar colour +Set status line message foreground colour when in command mode. .It Ic message-fg Ar colour Set status line message foreground colour. .It Ic message-limit Ar number This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 _______________________________________________ tmux-cvs mailing list tmux-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-cvs