summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2005-02-17 18:57:05 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2005-02-17 18:57:05 +0000
commit329d87ab3a24f9af9e1ec2e6eb0012804294fc8b (patch)
tree3084b464ca641d1f1d90ea8b1d5211a15907d813
parent86f341e75623affacf377939e31182d754a6a584 (diff)
Printt ^D and newline on EOF in emacs mode like in vi mode.
Help and ok jaredy@ ok millert@
-rw-r--r--bin/ksh/emacs.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/ksh/emacs.c b/bin/ksh/emacs.c
index 56adce0a540..e47414a3fa5 100644
--- a/bin/ksh/emacs.c
+++ b/bin/ksh/emacs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: emacs.c,v 1.34 2004/12/23 11:29:02 jsg Exp $ */
+/* $OpenBSD: emacs.c,v 1.35 2005/02/17 18:57:04 otto Exp $ */
/*
* Emacs-like command line editing and history
@@ -795,6 +795,10 @@ x_newline(int c)
static int
x_end_of_text(int c)
{
+ x_zotc(edchars.eof);
+ x_putc('\r');
+ x_putc('\n');
+ x_flush();
return KEOL;
}