From: Christian Weisgerber Subject: tog: print newline on exit to clear bottom line To: gameoftrees@openbsd.org Date: Sat, 19 Sep 2020 16:13:22 +0200 TL;DR: Run "TERM=vt100 tog", quit, see for yourself. ---- Print newline to clear the bottom line when tog exits. When a curses(3)-based application exits, the cursor is positioned at the start of the bottom line, and the shell will issue the new prompt there. However, the bottom line may still contain remnants of the curses screen. This is only noticeable on terminals that do not switch to/from an alternate screen buffer. ---- Applications appear to be split in the way they handle this: some print a newline to scroll up the old curses screen, others issue a clear-to-eol. Opinions? OK? diff 6c13dcd2d0d730f9f9fc0fb0c42eb0f409216063 /home/naddy/got blob - 8eb6e6b273d41c6a726f1e8b5fe1b04fbcd17415 file + tog/tog.c --- tog/tog.c +++ tog/tog.c @@ -5686,6 +5686,7 @@ main(int argc, char *argv[]) } endwin(); + putchar('\n'); if (cmd_argv) { int i; for (i = 0; i < argc; i++) -- Christian "naddy" Weisgerber naddy@mips.inka.de