summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2019-11-15 11:21:33 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2019-11-15 11:21:33 +0000
commite3ed112e79ab5068132f55886647e09f26881fc2 (patch)
tree738afb06886b1e9e4fbe2410865c9b9f25bba0e4
parent701b6fdd62d028511117d4684d2ebcd667c93aa7 (diff)
Do not add path if it is NULL, duh.
-rw-r--r--usr.bin/tmux/format.c5
-rw-r--r--usr.bin/tmux/input.c3
2 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/tmux/format.c b/usr.bin/tmux/format.c
index 4c95e07b770..32422dfe900 100644
--- a/usr.bin/tmux/format.c
+++ b/usr.bin/tmux/format.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: format.c,v 1.214 2019/11/15 11:16:53 nicm Exp $ */
+/* $OpenBSD: format.c,v 1.215 2019/11/15 11:21:32 nicm Exp $ */
/*
* Copyright (c) 2011 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -2267,7 +2267,8 @@ format_defaults_pane(struct format_tree *ft, struct window_pane *wp)
format_add(ft, "pane_width", "%u", wp->sx);
format_add(ft, "pane_height", "%u", wp->sy);
format_add(ft, "pane_title", "%s", wp->base.title);
- format_add(ft, "pane_path", "%s", wp->base.path);
+ if (wp->base.path != NULL)
+ format_add(ft, "pane_path", "%s", wp->base.path);
format_add(ft, "pane_id", "%%%u", wp->id);
format_add(ft, "pane_active", "%d", wp == w->active);
format_add(ft, "pane_input_off", "%d", !!(wp->flags & PANE_INPUTOFF));
diff --git a/usr.bin/tmux/input.c b/usr.bin/tmux/input.c
index 41a0b5c9d70..c1193114ba4 100644
--- a/usr.bin/tmux/input.c
+++ b/usr.bin/tmux/input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: input.c,v 1.165 2019/11/15 11:16:53 nicm Exp $ */
+/* $OpenBSD: input.c,v 1.166 2019/11/15 11:21:32 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -132,7 +132,6 @@ static void input_set_state(struct window_pane *,
static void input_reset_cell(struct input_ctx *);
static void input_osc_4(struct input_ctx *, const char *);
-static void input_osc_7(struct input_ctx *, const char *);
static void input_osc_10(struct input_ctx *, const char *);
static void input_osc_11(struct input_ctx *, const char *);
static void input_osc_52(struct input_ctx *, const char *);