Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libcurses Disable typeahead being set to infd by default...
details: https://anonhg.NetBSD.org/src/rev/f775aca9915b
branches: trunk
changeset: 351550:f775aca9915b
user: roy <roy%NetBSD.org@localhost>
date: Fri Feb 17 11:18:38 2017 +0000
description:
Disable typeahead being set to infd by default as this seems to cause
refresh issues in nvi.
diffstat:
lib/libcurses/screen.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diffs (35 lines):
diff -r b48f08b73221 -r f775aca9915b lib/libcurses/screen.c
--- a/lib/libcurses/screen.c Fri Feb 17 10:51:48 2017 +0000
+++ b/lib/libcurses/screen.c Fri Feb 17 11:18:38 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: screen.c,v 1.31 2017/01/31 09:17:53 roy Exp $ */
+/* $NetBSD: screen.c,v 1.32 2017/02/17 11:18:38 roy Exp $ */
/*
* Copyright (c) 1981, 1993, 1994
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)screen.c 8.2 (blymn) 11/27/2001";
#else
-__RCSID("$NetBSD: screen.c,v 1.31 2017/01/31 09:17:53 roy Exp $");
+__RCSID("$NetBSD: screen.c,v 1.32 2017/02/17 11:18:38 roy Exp $");
#endif
#endif /* not lint */
@@ -135,7 +135,15 @@
#endif
new_screen->infd = infd;
- new_screen->checkfd = fileno(infd);
+ /*
+ * POSIX standard says this should be set to infd by default,
+ * but this seems to break nvi by leaving an unrefreshed screen.
+ * Also, the line breakout optimisation advertised in ncurses
+ * doesn't actually do anything, so explicitly disabling it here makes
+ * sense for the time being.
+ * A caller can always enable it by calling typeahead(3) anyway.
+ */
+ new_screen->checkfd = -1; // fileno(infd);
new_screen->outfd = outfd;
new_screen->echoit = new_screen->nl = 1;
new_screen->pfast = new_screen->rawmode = new_screen->noqch = 0;
Home |
Main Index |
Thread Index |
Old Index