summaryrefslogtreecommitdiffstats
path: root/bin/ed/re.c
diff options
context:
space:
mode:
authoralm <alm@FreeBSD.org>1993-06-26 06:47:21 +0000
committeralm <alm@FreeBSD.org>1993-06-26 06:47:21 +0000
commit3ee56e1af8d1034ab3f1f81bb3bca6e2e88bd8d8 (patch)
treea75d2f4512b2836bcc2e21f718151792e640b67f /bin/ed/re.c
parentc1b03d1c9c4a42a7c8acab252f2fd926b376b882 (diff)
downloadFreeBSD-src-3ee56e1af8d1034ab3f1f81bb3bca6e2e88bd8d8.zip
FreeBSD-src-3ee56e1af8d1034ab3f1f81bb3bca6e2e88bd8d8.tar.gz
fixed undo within a global command (would corrupt the buffer)
changed move within a global to behave as in SunOS added a couple error messages
Diffstat (limited to 'bin/ed/re.c')
-rw-r--r--bin/ed/re.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/ed/re.c b/bin/ed/re.c
index 462c816..e944750 100644
--- a/bin/ed/re.c
+++ b/bin/ed/re.c
@@ -71,7 +71,7 @@ optpat()
sprintf(errmsg, "invalid pattern delimiter");
return NULL;
} else if (*ibufp == delim) {
- sprintf(errmsg, "no previous pattern");
+ if (!exp) sprintf(errmsg, "no previous pattern");
return exp;
} else if ((exps = getlhs(delim)) == NULL)
return NULL;
OpenPOWER on IntegriCloud