I couldn't reproduce the reported problem of the "In what direction?" being issued after the screen was cleared, but bypassing pline() in favor of putstr(WIN_MESSAGE) for tty prompts did also bypass if (vision_full_recalc) vision_recalc(0); if (u.ux) flush_screen(1); done in pline(). Inadvertent loss of the latter could conceivably be responsible for the problem. If so, the escape code used by cl_end() may be broken for somebody's termcap or terminfo setup since clearing to the end of the line in the message window shouldn't erase the rest of the screen. Regardless, the prompting change also bypassed the ability to show the prompt with raw_printf() if the display wasn't fully intialized yet, so some change to the revised prompting was necessary anyway. Switching back from putstr(WIN_MESSAGE) to pline() resulted in duplicated entries in DUMPLOG message history, one with bare prompt followed by another with response appended, so more tweaking was needed. The result is use of new custompline() instead of normal pline(). custompline() accepts some message handling flags to give more control over pline()'s behavior. It's a more general variation of Norep() but its caller needs to specify an extra argument.
16 KiB
16 KiB