diff options
author | nicm <nicm> | 2021-01-04 08:43:16 +0000 |
---|---|---|
committer | nicm <nicm> | 2021-01-04 08:43:16 +0000 |
commit | bd0fb22f0a206a73ec3f41322571d56d9d7d7c5d (patch) | |
tree | a66752a7b2677b92bc4eec51a514b005ce0b9540 /options-table.c | |
parent | 606bd5f8c6be326ea2e4746de5d5e007fd04eef8 (diff) | |
download | rtmux-bd0fb22f0a206a73ec3f41322571d56d9d7d7c5d.tar.gz rtmux-bd0fb22f0a206a73ec3f41322571d56d9d7d7c5d.tar.bz2 rtmux-bd0fb22f0a206a73ec3f41322571d56d9d7d7c5d.zip |
Add a variant of remain-on-exit that only keeps the pane if the program
failed, GitHub issue 2513.
Diffstat (limited to 'options-table.c')
-rw-r--r-- | options-table.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/options-table.c b/options-table.c index 34a4c57b..a8276c86 100644 --- a/options-table.c +++ b/options-table.c @@ -69,6 +69,9 @@ static const char *options_table_set_clipboard_list[] = { static const char *options_table_window_size_list[] = { "largest", "smallest", "manual", "latest", NULL }; +static const char *options_table_remain_on_exit_list[] = { + "off", "on", "failed", NULL +}; /* Status line format. */ #define OPTIONS_TABLE_STATUS_FORMAT1 \ @@ -949,11 +952,12 @@ const struct options_table_entry options_table[] = { }, { .name = "remain-on-exit", - .type = OPTIONS_TABLE_FLAG, + .type = OPTIONS_TABLE_CHOICE, .scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE, + .choices = options_table_remain_on_exit_list, .default_num = 0, .text = "Whether panes should remain ('on') or be automatically " - "killed ('off') when the program inside exits." + "killed ('off' or 'failed') when the program inside exits." }, { .name = "synchronize-panes", |