summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.bin/tmux/spawn.c6
-rw-r--r--usr.bin/tmux/tmux.h3
-rw-r--r--usr.bin/tmux/window.c4
3 files changed, 5 insertions, 8 deletions
diff --git a/usr.bin/tmux/spawn.c b/usr.bin/tmux/spawn.c
index 35894e9f93f..724f4835db4 100644
--- a/usr.bin/tmux/spawn.c
+++ b/usr.bin/tmux/spawn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spawn.c,v 1.5 2019/05/27 12:48:52 nicm Exp $ */
+/* $OpenBSD: spawn.c,v 1.6 2019/06/30 19:21:53 nicm Exp $ */
/*
* Copyright (c) 2019 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -172,10 +172,8 @@ spawn_window(struct spawn_context *sc, char **cause)
/* Spawn the pane. */
wp = spawn_pane(sc, cause);
if (wp == NULL) {
- if (~sc->flags & SPAWN_RESPAWN) {
- window_destroy(w);
+ if (~sc->flags & SPAWN_RESPAWN)
winlink_remove(&s->windows, sc->wl);
- }
return (NULL);
}
diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h
index 8a37fb4ce93..85af1e2027d 100644
--- a/usr.bin/tmux/tmux.h
+++ b/usr.bin/tmux/tmux.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmux.h,v 1.916 2019/06/27 15:17:41 nicm Exp $ */
+/* $OpenBSD: tmux.h,v 1.917 2019/06/30 19:21:53 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -2362,7 +2362,6 @@ struct window *window_find_by_id_str(const char *);
struct window *window_find_by_id(u_int);
void window_update_activity(struct window *);
struct window *window_create(u_int, u_int);
-void window_destroy(struct window *);
void window_pane_set_event(struct window_pane *);
struct window_pane *window_get_active_at(struct window *, u_int, u_int);
struct window_pane *window_find_string(struct window *, const char *);
diff --git a/usr.bin/tmux/window.c b/usr.bin/tmux/window.c
index 95b919154dd..2a97b40c35a 100644
--- a/usr.bin/tmux/window.c
+++ b/usr.bin/tmux/window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: window.c,v 1.239 2019/06/26 18:44:22 nicm Exp $ */
+/* $OpenBSD: window.c,v 1.240 2019/06/30 19:21:53 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -338,7 +338,7 @@ window_create(u_int sx, u_int sy)
return (w);
}
-void
+static void
window_destroy(struct window *w)
{
log_debug("window @%u destroyed (%d references)", w->id, w->references);