Commit b46c1e045aae963c26a2e4959236dcdd6c285813

Christian Weisgerber 2020-09-20T22:22:04

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. ok stsp

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/tog/tog.c b/tog/tog.c
index 8eb6e6b..d46c6ec 100644
--- a/tog/tog.c
+++ b/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++)