summaryrefslogtreecommitdiffstats
path: root/bin/ksh/emacs.c
diff options
context:
space:
mode:
authorotto <otto@openbsd.org>2005-02-17 18:57:04 +0000
committerotto <otto@openbsd.org>2005-02-17 18:57:04 +0000
commitde098c7a093497e76ddbffe4cfabbb21bd84edd2 (patch)
tree9749913bf0f1820f1716d83e34d3279d6f0a046b /bin/ksh/emacs.c
parentderived from NetBSD: (diff)
downloadwireguard-openbsd-de098c7a093497e76ddbffe4cfabbb21bd84edd2.tar.xz
wireguard-openbsd-de098c7a093497e76ddbffe4cfabbb21bd84edd2.zip
Printt ^D and newline on EOF in emacs mode like in vi mode.
Help and ok jaredy@ ok millert@
Diffstat (limited to 'bin/ksh/emacs.c')
-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;
}