| 380 | /* Clear the message window if one line; otherwise unhighlight old messages */ |
| 381 | |
| 382 | void |
| 383 | curses_clear_unhighlight_message_window(void) |
| 384 | { |
| 385 | int mh, mw, rx, ry, |
| 386 | brdroffset = curses_window_has_border(MESSAGE_WIN) ? 1 : 0; |
| 387 | WINDOW *win = curses_get_nhwin(MESSAGE_WIN); |
| 388 | |
| 389 | turn_lines = 0; |
| 390 | curses_set_wid_colors(MESSAGE_WIN, NULL); |
| 391 | curses_get_window_size(MESSAGE_WIN, &mh, &mw); |
| 392 | |
| 393 | if (mh == 1) { |
| 394 | curses_clear_nhwin(MESSAGE_WIN); |
| 395 | mx = my = brdroffset; |
| 396 | } else { |
| 397 | mx = mw + brdroffset; /* Force new line on new turn */ |
| 398 | |
| 399 | for (ry = brdroffset; ry < mh; ry++) { |
| 400 | for (rx = brdroffset; rx < mw; rx++) { |
| 401 | chtype cht = mvwinch(win, ry, rx); |
| 402 | |
| 403 | mvwchgat(win, ry, rx, 1, A_NORMAL, PAIR_NUMBER(cht), NULL); |
| 404 | } |
| 405 | } |
| 406 | |
| 407 | wnoutrefresh(win); |
| 408 | } |
| 409 | wmove(win, my, mx); |
| 410 | } |
| 411 | |
| 412 | |
| 413 | /* Reset message window cursor to starting position, and display most |
no test coverage detected