From aa821006de8bf729453b97591a5e8e19cf77035b Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 25 Mar 2023 00:57:28 -0700 Subject: [PATCH] curses: message window border again This is a better workaround for the missing message window border when when restoring with align_status:left. Unlike the previous hack, this may even be the correct way to handle it in the first place. I haven't tracked down when the problem started. --- win/curses/cursmesg.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/win/curses/cursmesg.c b/win/curses/cursmesg.c index 42f6825a3..ebcf9e6b1 100644 --- a/win/curses/cursmesg.c +++ b/win/curses/cursmesg.c @@ -986,20 +986,13 @@ curses_putmsghistory(const char *msg, boolean restoring_msghist) } /* - * FIXME: - * restoring a game with window borders on and align_status:left - * (which pushes the starting column of the message window to the - * right) brings up an initial display where the border around - * the message window is missing. Once a new message causes it - * to be scrolled, its border appears. This absurd hack forces - * that to be shown right away. + * Restoring a game with window borders on and align_status:left + * (which pushes the starting column of the message window to the + * right) brings up an initial display where the border around + * the message window is missing. This draws it. */ - if (restoring_msghist && curses_window_has_border(WIN_MESSAGE)) { - WINDOW *win = curses_get_nhwin(WIN_MESSAGE); - - box(win, 0, 0); - wrefresh(win); - } + if (restoring_msghist) + curses_last_messages(); } /*cursmesg.c*/