From 4d5358fd7c257f9f2610a68567e988f001a69287 Mon Sep 17 00:00:00 2001 From: Kjell Wooding Date: Sun, 24 Dec 2006 01:20:54 +0000 Subject: Fix a bug where inserting a file resulted in an incorrect line-number count for a buffer (M-X insert-file, M-> to reproduce). While here, fix a number of bugs with incorrect line numbers after swap point-and-mark Originally reported via debian's bug tracking system. Fix tested by Han Boetes and Deanna Phillips. --- usr.bin/mg/fileio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'usr.bin/mg/fileio.c') diff --git a/usr.bin/mg/fileio.c b/usr.bin/mg/fileio.c index 82e8d978fc5..9a148063ffa 100644 --- a/usr.bin/mg/fileio.c +++ b/usr.bin/mg/fileio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fileio.c,v 1.79 2006/11/19 16:51:19 deraadt Exp $ */ +/* $OpenBSD: fileio.c,v 1.80 2006/12/24 01:20:53 kjell Exp $ */ /* This file is in the public domain. */ @@ -139,6 +139,7 @@ ffputbuf(struct buffer *bp) * in the supplied buffer. Stop on end of file or end of * line. When FIOEOF is returned, there is a valid line * of data without the normally implied \n. + * If the line length exceeds nbuf, FIOLONG is returned. */ int ffgetline(char *buf, int nbuf, int *nbytes) -- cgit v1.2.3