summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2007-06-10 19:10:07 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2007-06-10 19:10:07 +0000
commit7c5ee8dfe56591e5cc5ac9587b340871db2b4bd7 (patch)
tree50711723068c5393a1e79e93277fe0032a2dece5
parentc0f4aca1ed3c2abde3963d9575a3d8457ca64c8c (diff)
clear to end of line at quit, needed for terms that do not restore
content on quiting curses mode, like screen. found and tested by ray@
-rw-r--r--usr.bin/top/screen.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/top/screen.c b/usr.bin/top/screen.c
index 847bb0111dc..ea983c3163f 100644
--- a/usr.bin/top/screen.c
+++ b/usr.bin/top/screen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: screen.c,v 1.17 2007/05/29 00:56:56 otto Exp $ */
+/* $OpenBSD: screen.c,v 1.18 2007/06/10 19:10:06 otto Exp $ */
/*
* Top users/processes display for Unix
@@ -169,8 +169,12 @@ init_screen(void)
void
end_screen(void)
{
- if (smart_terminal)
+ if (smart_terminal) {
+ move(screen_length-1, 0);
+ clrtoeol();
+ refresh();
endwin();
+ }
if (is_a_terminal)
(void) tcsetattr(STDOUT_FILENO, TCSADRAIN, &old_settings);
}