mirror of
https://github.com/tmux/tmux.git
synced 2025-11-03 00:06:07 +00:00
Add next_session_id format with the next session ID, GitHub issue 3078.
This commit is contained in:
10
format.c
10
format.c
@@ -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
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user