summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortb <tb@openbsd.org>2015-11-20 08:53:28 +0000
committertb <tb@openbsd.org>2015-11-20 08:53:28 +0000
commit7b8e45311690a7cb6e92b188891e5737086eafd9 (patch)
tree18afc0dbf869a13e2af103195f8829291e8b9eac
parentpledge "stdio rpath wpath cpath tty" (diff)
downloadwireguard-openbsd-7b8e45311690a7cb6e92b188891e5737086eafd9.tar.xz
wireguard-openbsd-7b8e45311690a7cb6e92b188891e5737086eafd9.zip
make ed restore the user defined prompt (specified with -p) when it was turned
off and then on again with 'P'. ok daniel@
-rw-r--r--bin/ed/ed.17
-rw-r--r--bin/ed/main.c4
2 files changed, 5 insertions, 6 deletions
diff --git a/bin/ed/ed.1 b/bin/ed/ed.1
index a4ffa701f80..336f633f344 100644
--- a/bin/ed/ed.1
+++ b/bin/ed/ed.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ed.1,v 1.65 2015/09/14 20:06:58 schwarze Exp $
+.\" $OpenBSD: ed.1,v 1.66 2015/11/20 08:53:28 tb Exp $
.\"
.\" Copyright (c) 1993 Andrew Moore, Talke Studio.
.\" All rights reserved.
@@ -24,7 +24,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: September 14 2015 $
+.Dd $Mdocdate: November 20 2015 $
.Dt ED 1
.Os
.Sh NAME
@@ -836,8 +836,7 @@ that the result of a user defined prompt
being turned off then on again with the
.Ic P
command should restore the user defined prompt;
-this implementation currently restores the default prompt
-.Pq * .
+this implementation currently restores the user defined prompt.
.Sh HISTORY
An
.Nm
diff --git a/bin/ed/main.c b/bin/ed/main.c
index 0cfa89976c8..e509b84d887 100644
--- a/bin/ed/main.c
+++ b/bin/ed/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.55 2015/10/25 03:40:58 guenther Exp $ */
+/* $OpenBSD: main.c,v 1.56 2015/11/20 08:53:28 tb Exp $ */
/* $NetBSD: main.c,v 1.3 1995/03/21 09:04:44 cgd Exp $ */
/* main.c: This file contains the main control and user-interface routines
@@ -130,7 +130,7 @@ top:
while ((c = getopt(argc, argv, "p:sx")) != -1)
switch (c) {
case 'p': /* set prompt */
- prompt = optarg;
+ dps = prompt = optarg;
break;
case 's': /* run script */
scripted = 1;