From d9eb34b28dd9b446118911df5d161b817632093b Mon Sep 17 00:00:00 2001 From: Tiago Cunha Date: Fri, 20 Jan 2012 21:18:39 +0000 Subject: [PATCH] Sync OpenBSD patchset 999: Add an option to disable the window rename escape sequence, from Romain Francoise. --- input.c | 2 ++ options-table.c | 5 +++++ tmux.1 | 7 +++++++ 3 files changed, 14 insertions(+) diff --git a/input.c b/input.c index 17307e97..bb23580c 100644 --- a/input.c +++ b/input.c @@ -1558,6 +1558,8 @@ input_exit_rename(struct input_ctx *ictx) { if (ictx->flags & INPUT_DISCARD) return; + if (!options_get_number(&ictx->wp->window->options, "allow-rename")) + return; log_debug("%s: \"%s\"", __func__, ictx->input_buf); xfree(ictx->wp->window->name); diff --git a/options-table.c b/options-table.c index 2700536a..83187801 100644 --- a/options-table.c +++ b/options-table.c @@ -435,6 +435,11 @@ const struct options_table_entry window_options_table[] = { .default_num = 0 }, + { .name = "allow-rename", + .type = OPTIONS_TABLE_FLAG, + .default_num = 1 + }, + { .name = "alternate-screen", .type = OPTIONS_TABLE_FLAG, .default_num = 1 diff --git a/tmux.1 b/tmux.1 index 0b8f077a..926ada95 100644 --- a/tmux.1 +++ b/tmux.1 @@ -2346,6 +2346,13 @@ this option is good for full-screen programs which support .Dv SIGWINCH and poor for interactive programs such as shells. .Pp +.It Xo Ic allow-rename +.Op Ic on | off +.Xc +Allow programs to change the window name using a terminal escape +sequence (\\033k...\\033\\\\). +The default is on. +.Pp .It Xo Ic alternate-screen .Op Ic on | off .Xc