From 10f0094be9157eba9d6dad8eace00641de960748 Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 13 Mar 2019 21:39:21 +0000 Subject: [PATCH] The pane's style should be initialized to default before parsing the argument. --- cmd-select-pane.c | 3 +++ colour.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd-select-pane.c b/cmd-select-pane.c index 90ca46ba..87156250 100644 --- a/cmd-select-pane.c +++ b/cmd-select-pane.c @@ -19,6 +19,7 @@ #include #include +#include #include "tmux.h" @@ -143,6 +144,8 @@ cmd_select_pane_exec(struct cmd *self, struct cmdq_item *item) if (args_has(self->args, 'P') || args_has(self->args, 'g')) { if (args_has(args, 'P')) { style = args_get(args, 'P'); + memcpy(&wp->colgc, &grid_default_cell, + sizeof wp->colgc); if (style_parse(&grid_default_cell, &wp->colgc, style) == -1) { cmdq_error(item, "bad style: %s", style); diff --git a/colour.c b/colour.c index a0274dd3..eaee6058 100644 --- a/colour.c +++ b/colour.c @@ -160,7 +160,7 @@ colour_tostring(int c) case 97: return ("brightwhite"); } - return (NULL); + return ("invalid"); } /* Convert colour from string. */