Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam
2026-07-03 16:30:06 +01:00
2 changed files with 34 additions and 0 deletions

View File

@@ -2862,6 +2862,19 @@ format_cb_window_height(struct format_tree *ft)
return (NULL);
}
/* Callback for window_manual_height. */
static void *
format_cb_window_manual_height(struct format_tree *ft)
{
struct window *w = ft->w;
if (w == NULL)
return (NULL);
if (options_get_number(w->options, "window-size") != WINDOW_SIZE_MANUAL)
return (xstrdup(""));
return (format_printf("%u", w->manual_sy));
}
/* Callback for window_id. */
static void *
format_cb_window_id(struct format_tree *ft)
@@ -3042,6 +3055,19 @@ format_cb_window_width(struct format_tree *ft)
return (NULL);
}
/* Callback for window_manual_width. */
static void *
format_cb_window_manual_width(struct format_tree *ft)
{
struct window *w = ft->w;
if (w == NULL)
return (NULL);
if (options_get_number(w->options, "window-size") != WINDOW_SIZE_MANUAL)
return (xstrdup(""));
return (format_printf("%u", w->manual_sx));
}
/* Callback for window_zoomed_flag. */
static void *
format_cb_window_zoomed_flag(struct format_tree *ft)
@@ -3748,6 +3774,12 @@ static const struct format_table_entry format_table[] = {
{ "window_linked_sessions_list", FORMAT_TABLE_STRING,
format_cb_window_linked_sessions_list
},
{ "window_manual_height", FORMAT_TABLE_STRING,
format_cb_window_manual_height
},
{ "window_manual_width", FORMAT_TABLE_STRING,
format_cb_window_manual_width
},
{ "window_marked_flag", FORMAT_TABLE_STRING,
format_cb_window_marked_flag
},

2
tmux.1
View File

@@ -7182,6 +7182,8 @@ The following variables are available, where appropriate:
.It Li "window_linked" Ta "" Ta "1 if window is linked across sessions"
.It Li "window_linked_sessions" Ta "" Ta "Number of sessions this window is linked to"
.It Li "window_linked_sessions_list" Ta "" Ta "List of sessions this window is linked to"
.It Li "window_manual_height" Ta "" Ta "Manual height of window, if set"
.It Li "window_manual_width" Ta "" Ta "Manual width of window, if set"
.It Li "window_marked_flag" Ta "" Ta "1 if window contains the marked pane"
.It Li "window_name" Ta "#W" Ta "Name of window"
.It Li "window_offset_x" Ta "" Ta "X offset into window if larger than client"