Reported directly to devteam last October, for 3.4.3 on NAO,
subject "UI flaw in message history":
"Applying the stethoscope at self informs:
"Status of Xxxxxxxx (piously neutral): Level 14 HP 138(138) AC -15, very
"fast, invisible.--More--
This is reproducible with shorter character name "wizard" by being
"nominally neutral" or "nominally chaotic". I had a 2 digit level
but didn't notice that my AC took up only 1 digit and ended up
using 125ish blessed potions of full healing to get 4 digits of hit
points in order to get the line to wrap between "very" and "fast".
"But the message history with Ctrl-P shows:
"Message History
"
"Status of Xxxxxxxx (piously neutral): Level 14 HP 138(138) AC -15, very
"invisible.
The key was "Message History", indicating msg_window:full or other
setting which causes ^P to bypass the top line message window and
use a general text window to deliver all history lines at once.
The original feedback splits the line by replacing the space
between "very" and "fast" with a newline, which topline handling
notices and processes as special, but then leaves in place.
msg_window:full results in tty_putstr() case NHW_TEXT, which treats
newline as an ordinary character since it doesn't expect to see
that in text. Squeezing out three doubled spaces made room for
"very\nfast," on the top line. process_text_window() attempted to
write it there, but putchar() wrote up through "very," on one line,
then output the newline which resulted in "fast," on the next line.
Then explicit cursor positioning set things up to put "invisible"
at the start of that line, overwriting "fast," so making it appear
to be missing.