summaryrefslogtreecommitdiffstats
path: root/contrib/nvi/vi/v_ex.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/nvi/vi/v_ex.c')
-rw-r--r--contrib/nvi/vi/v_ex.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/nvi/vi/v_ex.c b/contrib/nvi/vi/v_ex.c
index bcb0ea6..d4d431a 100644
--- a/contrib/nvi/vi/v_ex.c
+++ b/contrib/nvi/vi/v_ex.c
@@ -428,6 +428,10 @@ v_ex(sp, vp)
if (tp->term == TERM_BS)
break;
+ /* If the user changed their mind, return. */
+ if (tp->term != TERM_OK)
+ break;
+
/* Log the command. */
if (O_STR(sp, O_CEDIT) != NULL && v_ecl_log(sp, tp))
return (1);
OpenPOWER on IntegriCloud