Do not ignore lists with no alignment.

This commit is contained in:
nicm
2026-10-15 22:27:24 +00:00
committed by tmux update bot
parent 330876a0a9
commit 786e738b74

View File

@@ -1,4 +1,4 @@
/* $OpenBSD: format-draw.c,v 1.34 2026/07/21 07:20:18 nicm Exp $ */ /* $OpenBSD: format-draw.c,v 1.35 2026/10/15 22:27:24 nicm Exp $ */
/* /*
* Copyright (c) 2019 Nicholas Marriott <nicholas.marriott@gmail.com> * Copyright (c) 2019 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -1007,6 +1007,14 @@ format_draw(struct screen_write_ctx *octx, const struct grid_cell *base,
*/ */
switch (list_align) { switch (list_align) {
case STYLE_ALIGN_DEFAULT: case STYLE_ALIGN_DEFAULT:
if (s[LIST].cx != 0 || s[AFTER].cx != 0) {
/* A list with default alignment is part of the left. */
format_draw_left(octx, available, ocx, ocy, &s[LEFT],
&s[CENTRE], &s[RIGHT], &s[ABSOLUTE_CENTRE],
&s[LIST], &s[LIST_LEFT], &s[LIST_RIGHT], &s[AFTER],
focus_start, focus_end, &frs);
break;
}
/* No list. */ /* No list. */
format_draw_none(octx, available, ocx, ocy, &s[LEFT], format_draw_none(octx, available, ocx, ocy, &s[LEFT],
&s[CENTRE], &s[RIGHT], &s[ABSOLUTE_CENTRE], &frs); &s[CENTRE], &s[RIGHT], &s[ABSOLUTE_CENTRE], &frs);