summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Valchev <pvalchev@cvs.openbsd.org>2006-03-20 01:00:37 +0000
committerPeter Valchev <pvalchev@cvs.openbsd.org>2006-03-20 01:00:37 +0000
commit47d1b7910df488e3f366bcf35740d01d2e08323c (patch)
tree8e4a1def8456f496f4089743a528bd23cf29d4c2
parent6777f61b28a41bd625dd4200947cb760b420f798 (diff)
if we're in visual mode reading a command, check the termination value
of v_tcmd() and bail if it's not TERM_OK as opposed to in a more specific case. this is based on the NetBSD ^C fix but after discussion with otto@. while it did not affect the specific crash it is more correct.
-rw-r--r--usr.bin/vi/vi/v_ex.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/vi/vi/v_ex.c b/usr.bin/vi/vi/v_ex.c
index 9024817d763..5043d5c4c7b 100644
--- a/usr.bin/vi/vi/v_ex.c
+++ b/usr.bin/vi/vi/v_ex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: v_ex.c,v 1.7 2006/02/17 19:12:41 otto Exp $ */
+/* $OpenBSD: v_ex.c,v 1.8 2006/03/20 01:00:36 pvalchev Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -425,8 +425,8 @@ v_ex(sp, vp)
break;
}
- /* If the user didn't enter anything, return. */
- if (tp->term == TERM_BS)
+ /* If the user changed their mind, return. */
+ if (tp->term != TERM_OK)
break;
/* Log the command. */