mirror of https://github.com/tmux/tmux.git
add new option `allow-rename-pane` to control whether pane-title should set by escape sequence
parent
887cdccacf
commit
c124d74fd2
|
@ -212,7 +212,6 @@ cmd_select_pane_exec(struct cmd *self, struct cmdq_item *item)
|
|||
if (args_has(args, 'T')) {
|
||||
title = format_single_from_target(item, args_get(args, 'T'));
|
||||
if (screen_set_title(&wp->base, title)) {
|
||||
wp->base.ignore_osc_2 = 1;
|
||||
notify_pane("pane-title-changed", wp);
|
||||
server_redraw_window_borders(wp->window);
|
||||
server_status_window(wp->window);
|
||||
|
|
3
input.c
3
input.c
|
@ -2372,7 +2372,8 @@ input_exit_osc(struct input_ctx *ictx)
|
|||
switch (option) {
|
||||
case 0:
|
||||
case 2:
|
||||
if ( sctx->s->ignore_osc_2 == 0 && screen_set_title(sctx->s, p) && wp != NULL) {
|
||||
if (options_get_number(ictx->wp->options, "allow-rename-pane") == 1 &&
|
||||
screen_set_title(sctx->s, p) && wp != NULL) {
|
||||
notify_pane("pane-title-changed", wp);
|
||||
server_redraw_window_borders(wp->window);
|
||||
server_status_window(wp->window);
|
||||
|
|
|
@ -875,6 +875,14 @@ const struct options_table_entry options_table[] = {
|
|||
"to rename windows."
|
||||
},
|
||||
|
||||
{ .name = "allow-rename-pane",
|
||||
.type = OPTIONS_TABLE_FLAG,
|
||||
.scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
|
||||
.default_num = 0,
|
||||
.text = "Whether applications are allowed to use the escape sequence "
|
||||
"to rename pane."
|
||||
},
|
||||
|
||||
{ .name = "alternate-screen",
|
||||
.type = OPTIONS_TABLE_FLAG,
|
||||
.scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
|
||||
|
|
Loading…
Reference in New Issue