summaryrefslogtreecommitdiff
path: root/usr.bin/mg/line.c
diff options
context:
space:
mode:
authorMark Lumsden <lum@cvs.openbsd.org>2021-03-01 10:51:15 +0000
committerMark Lumsden <lum@cvs.openbsd.org>2021-03-01 10:51:15 +0000
commite2cabf3b47ab75eb968195e43fb2218e2e1d2e56 (patch)
tree66a36542c9e28985db3506f7457462ab5d42ad69 /usr.bin/mg/line.c
parent3efb214d73d4cdb8e7a190f97228a97baf4a9059 (diff)
Put the hardcoded '\n' character which is found throughout mg into a
buffer specific variable. The diff should not produce any behavourial changes in mg.
Diffstat (limited to 'usr.bin/mg/line.c')
-rw-r--r--usr.bin/mg/line.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/mg/line.c b/usr.bin/mg/line.c
index 527893b119f..5a635ae5440 100644
--- a/usr.bin/mg/line.c
+++ b/usr.bin/mg/line.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: line.c,v 1.62 2020/07/22 13:22:53 tb Exp $ */
+/* $OpenBSD: line.c,v 1.63 2021/03/01 10:51:14 lum Exp $ */
/* This file is in the public domain. */
@@ -397,7 +397,7 @@ ldelete(RSIZE n, int kflag)
lchange(WFFULL);
if (ldelnewline() == FALSE)
goto out;
- end = strlcat(sv, "\n", len + 1);
+ end = strlcat(sv, curbp->b_nlchr, len + 1);
--n;
continue;
}