Well, endwin will reset the colors. You could bypass that by making a substitute for endwin (which is a little complicated): use reset_shell_mode to fix the terminal mode, and tparm/tputs to move the cursor to the lower-left corner as well as sending the rmcup, rmkx terminfo capabilities to get the cursor-keys working again.
|