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)
This commit is contained in:
parent
ed5298eb2f
commit
a68282c497
|
@ -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 @@ file_init(sp, frp, rcv_name, flags)
|
|||
/* 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) {
|
||||
|
|
|
@ -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 @@ v_init(sp)
|
|||
* 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. */
|
||||
|
|
Loading…
Reference in New Issue