summaryrefslogtreecommitdiffstats
path: root/cmd-select-pane.c
diff options
context:
space:
mode:
authornicm <nicm>2019-03-13 21:39:21 +0000
committernicm <nicm>2019-03-13 21:39:21 +0000
commit10f0094be9157eba9d6dad8eace00641de960748 (patch)
tree0c6c13c6b2ec14745ec28fff12a0dbb156062b08 /cmd-select-pane.c
parent6dffbc4849e856025bc491c761e6422b996535a0 (diff)
The pane's style should be initialized to default before parsing the
argument.
Diffstat (limited to 'cmd-select-pane.c')
-rw-r--r--cmd-select-pane.c3
1 files changed, 3 insertions, 0 deletions
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 <sys/types.h>
#include <stdlib.h>
+#include <string.h>
#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);