Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/vi Fix FreeBSD PR #12801 in such a way that it doesn...
details: https://anonhg.NetBSD.org/src/rev/06bac7509908
branches: trunk
changeset: 525678:06bac7509908
user: pooka <pooka%NetBSD.org@localhost>
date: Mon Apr 15 08:31:42 2002 +0000
description:
Fix FreeBSD PR #12801 in such a way that it doesn't create unfortunate
side-effects, like the ones described in bin/15891 and bin/16210.
patch from Sven Verdoolaege (nvi maintainer)
diffstat:
usr.bin/vi/common/exf.c | 7 +++++--
usr.bin/vi/vi/vi.c | 5 +++--
2 files changed, 8 insertions(+), 4 deletions(-)
diffs (54 lines):
diff -r f43e2d6c0eeb -r 06bac7509908 usr.bin/vi/common/exf.c
--- a/usr.bin/vi/common/exf.c Mon Apr 15 08:11:00 2002 +0000
+++ b/usr.bin/vi/common/exf.c Mon Apr 15 08:31:42 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: exf.c,v 1.9 2002/04/09 01:47:31 thorpej Exp $ */
+/* $NetBSD: exf.c,v 1.10 2002/04/15 08:31:43 pooka Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -16,7 +16,7 @@
#if 0
static const char sccsid[] = "@(#)exf.c 10.49 (Berkeley) 10/10/96";
#else
-__RCSID("$NetBSD: exf.c,v 1.9 2002/04/09 01:47:31 thorpej Exp $");
+__RCSID("$NetBSD: exf.c,v 1.10 2002/04/15 08:31:43 pooka Exp $");
#endif
#endif /* not lint */
@@ -421,6 +421,9 @@
/* Redraw the screen from scratch, schedule a welcome message. */
F_SET(sp, SC_SCR_REFORMAT | SC_STATUS);
+ if (frp->lno == OOBLNO)
+ F_SET(sp, SC_SCR_TOP);
+
return (0);
err: if (frp->name != NULL) {
diff -r f43e2d6c0eeb -r 06bac7509908 usr.bin/vi/vi/vi.c
--- a/usr.bin/vi/vi/vi.c Mon Apr 15 08:11:00 2002 +0000
+++ b/usr.bin/vi/vi/vi.c Mon Apr 15 08:31:42 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vi.c,v 1.12 2002/04/09 01:47:36 thorpej Exp $ */
+/* $NetBSD: vi.c,v 1.13 2002/04/15 08:31:42 pooka Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -16,7 +16,7 @@
#if 0
static const char sccsid[] = "@(#)vi.c 10.57 (Berkeley) 10/13/96";
#else
-__RCSID("$NetBSD: vi.c,v 1.12 2002/04/09 01:47:36 thorpej Exp $");
+__RCSID("$NetBSD: vi.c,v 1.13 2002/04/15 08:31:42 pooka Exp $");
#endif
#endif /* not lint */
@@ -991,6 +991,7 @@
* line in the middle, otherwise, it won't work and we'll end up with
* the line at the top.
*/
+ F_CLR(sp, SC_SCR_TOP);
F_SET(sp, SC_SCR_REFORMAT | SC_SCR_CENTER);
/* Invalidate the cursor. */
Home |
Main Index |
Thread Index |
Old Index