问题
Assume you have a NCurses Window (could be a subwindow) with dimensions ROWS and COLS. How do I set the character at ROWS-1 and COLS-1. If I use waddstr at this position with one character it doesn't work (throws a user exception). I assume this is because the cursor is moved to a position outside the window?
回答1:
The behaviour seems to be intentional: http://old.nabble.com/Setting-last-character-on-screen-%28without-scrolling-enabled%29-to33969235.html
checking portability: Solaris 10 returns ERR IRIX64 returns ERR HPUX 11.23 returns OK Tru64 returns ERR AIX 6.1 returns OK
Though HPUX implemented SVr4, it was the last (and some of its differences from the other systems demonstrate that the implementers relied more on documentation than on cross-checking). Tru64 is technically the best of the above listed; Solaris has a lot of code rot. So I've found no reason to change the quirk.
-- Thomas E. Dickey
来源:https://stackoverflow.com/questions/10877469/ncurses-setting-last-character-on-screen-without-scrolling-enabled