diff options
author | nicm <nicm> | 2021-02-01 08:01:14 +0000 |
---|---|---|
committer | nicm <nicm> | 2021-02-01 08:01:14 +0000 |
commit | 509221520c87510016f5c90aeea0d4dcc4b74a98 (patch) | |
tree | a006a5c8f78a2f0c725f9c11335fed1a21e8fb54 /options-table.c | |
parent | 255802d8d7357bf985bf2e4221eac8ab64b348ea (diff) | |
download | rtmux-509221520c87510016f5c90aeea0d4dcc4b74a98.tar.gz rtmux-509221520c87510016f5c90aeea0d4dcc4b74a98.tar.bz2 rtmux-509221520c87510016f5c90aeea0d4dcc4b74a98.zip |
Add a no-detached choice to detach-on-destroy which detaches only if
there are no other detached sessions to switch to, from Sencer Selcuk in
GitHub issue 2553.
Diffstat (limited to 'options-table.c')
-rw-r--r-- | options-table.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/options-table.c b/options-table.c index 74a59134..9fc69db5 100644 --- a/options-table.c +++ b/options-table.c @@ -72,6 +72,9 @@ static const char *options_table_window_size_list[] = { static const char *options_table_remain_on_exit_list[] = { "off", "on", "failed", NULL }; +static const char *options_table_detach_on_destroy_list[] = { + "off", "on", "no-detached", NULL +}; /* Status line format. */ #define OPTIONS_TABLE_STATUS_FORMAT1 \ @@ -405,8 +408,9 @@ const struct options_table_entry options_table[] = { }, { .name = "detach-on-destroy", - .type = OPTIONS_TABLE_FLAG, + .type = OPTIONS_TABLE_CHOICE, .scope = OPTIONS_TABLE_SESSION, + .choices = options_table_detach_on_destroy_list, .default_num = 1, .text = "Whether to detach when a session is destroyed, or switch " "the client to another session if any exist." |