mirror of
https://github.com/tmux/tmux.git
synced 2026-06-20 17:25:57 +00:00
Merge branch 'obsd-master'
This commit is contained in:
16
spawn.c
16
spawn.c
@@ -74,15 +74,12 @@ spawn_log(const char *from, struct spawn_context *sc)
|
||||
struct winlink *
|
||||
spawn_window(struct spawn_context *sc, char **cause)
|
||||
{
|
||||
struct cmdq_item *item = sc->item;
|
||||
struct client *c = cmdq_get_client(item);
|
||||
struct session *s = sc->s;
|
||||
struct window *w;
|
||||
struct window_pane *wp;
|
||||
struct winlink *wl;
|
||||
int idx = sc->idx;
|
||||
u_int sx, sy, xpixel, ypixel;
|
||||
char *name;
|
||||
|
||||
spawn_log(__func__, sc);
|
||||
|
||||
@@ -180,15 +177,12 @@ spawn_window(struct spawn_context *sc, char **cause)
|
||||
/* Set the name of the new window. */
|
||||
if (~sc->flags & SPAWN_RESPAWN) {
|
||||
free(w->name);
|
||||
if (sc->name != NULL) {
|
||||
name = format_single(item, sc->name, c, s, NULL, NULL);
|
||||
w->name = clean_name(name, "#");
|
||||
free(name);
|
||||
if (w->name == NULL)
|
||||
w->name = xstrdup("");
|
||||
options_set_number(w->options, "automatic-rename", 0);
|
||||
} else
|
||||
if (sc->name == NULL || *sc->name == '\0')
|
||||
w->name = default_window_name(w);
|
||||
else {
|
||||
w->name = xstrdup(sc->name);
|
||||
options_set_number(w->options, "automatic-rename", 0);
|
||||
}
|
||||
}
|
||||
|
||||
/* Switch to the new window if required. */
|
||||
|
||||
Reference in New Issue
Block a user