From 9c90138af6645b484e64450701f02bf46478feb1 Mon Sep 17 00:00:00 2001 From: Jocelyn Falempe Date: Fri, 17 Apr 2026 22:34:13 +0200 Subject: [PATCH] screen: Fix wrong attribute for new cells when resizing When increasing the size of the terminal, the new cells are black, regardless of the current color attribute. The resize code used def_main_attr, that can be unitialized. Make sure def_main_attr is set to the correct value. Signed-off-by: Jocelyn Falempe --- src/tsm/tsm-screen.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tsm/tsm-screen.c b/src/tsm/tsm-screen.c index 3c8dd7f..f673b74 100644 --- a/src/tsm/tsm-screen.c +++ b/src/tsm/tsm-screen.c @@ -1021,6 +1021,8 @@ void tsm_screen_set_def_attr(struct tsm_screen *con, if (!con || !attr) return; memcpy(&con->def_attr, attr, sizeof(*attr)); + if (!(con->flags & TSM_SCREEN_ALTERNATE)) + memcpy(&con->def_attr_main, attr, sizeof(*attr)); } SHL_EXPORT