diff options
author | nicm <nicm> | 2022-02-22 11:10:41 +0000 |
---|---|---|
committer | nicm <nicm> | 2022-02-22 11:10:41 +0000 |
commit | fa71e9a07911715da596d618fe045943337c596b (patch) | |
tree | cd33824c0c9a11b12a6f378c8f64cb1929384d8d /format.c | |
parent | 0fd01f8873ccae655b0f997ca0dc46c42ebe399d (diff) |
Add next_session_id format with the next session ID, GitHub issue 3078.
Diffstat (limited to 'format.c')
-rw-r--r-- | format.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -1650,6 +1650,13 @@ format_cb_mouse_y(struct format_tree *ft) return (NULL); } +/* Callback for next_session_id. */ +static void * +format_cb_next_session_id(__unused struct format_tree *ft) +{ + return (format_printf("$%u", next_session_id)); +} + /* Callback for origin_flag. */ static void * format_cb_origin_flag(struct format_tree *ft) @@ -2707,6 +2714,9 @@ static const struct format_table_entry format_table[] = { { "mouse_y", FORMAT_TABLE_STRING, format_cb_mouse_y }, + { "next_session_id", FORMAT_TABLE_STRING, + format_cb_next_session_id + }, { "origin_flag", FORMAT_TABLE_STRING, format_cb_origin_flag }, |