Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/games/cgram cgram: clear bottom line of the screen at the end



details:   https://anonhg.NetBSD.org/src/rev/8cc2d5fcda96
branches:  trunk
changeset: 366100:8cc2d5fcda96
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat May 14 14:20:10 2022 +0000

description:
cgram: clear bottom line of the screen at the end

Previously, the prompt line of the shell overwrote only part of the
prompt of cgram, the rest was still visible.

diffstat:

 games/cgram/cgram.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r f232f3729b4d -r 8cc2d5fcda96 games/cgram/cgram.c
--- a/games/cgram/cgram.c       Sat May 14 14:02:08 2022 +0000
+++ b/games/cgram/cgram.c       Sat May 14 14:20:10 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cgram.c,v 1.27 2022/03/28 20:00:29 rillig Exp $ */
+/* $NetBSD: cgram.c,v 1.28 2022/05/14 14:20:10 rillig Exp $ */
 
 /*-
  * Copyright (c) 2013, 2021 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: cgram.c,v 1.27 2022/03/28 20:00:29 rillig Exp $");
+__RCSID("$NetBSD: cgram.c,v 1.28 2022/05/14 14:20:10 rillig Exp $");
 #endif
 
 #include <assert.h>
@@ -579,6 +579,10 @@
 static void
 done(void)
 {
+       move(LINES - 1, 0);
+       clrtoeol();
+       refresh();
+
        endwin();
 
        stringarray_done(&sollines);



Home | Main Index | Thread Index | Old Index