Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/dist/nvi/ex Save command in :w !<command> for later :w !!
details: https://anonhg.NetBSD.org/src/rev/fc6e81102f03
branches: trunk
changeset: 748664:fc6e81102f03
user: dsl <dsl%NetBSD.org@localhost>
date: Sat Oct 31 14:30:55 2009 +0000
description:
Save command in :w !<command> for later :w !!
Fixes PR/8169
diffstat:
dist/nvi/ex/ex_write.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diffs (30 lines):
diff -r 3eb81dab108e -r fc6e81102f03 dist/nvi/ex/ex_write.c
--- a/dist/nvi/ex/ex_write.c Fri Oct 30 20:57:30 2009 +0000
+++ b/dist/nvi/ex/ex_write.c Sat Oct 31 14:30:55 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ex_write.c,v 1.2 2008/12/05 22:51:42 christos Exp $ */
+/* $NetBSD: ex_write.c,v 1.3 2009/10/31 14:30:55 dsl Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -134,6 +134,7 @@
size_t nlen;
const char *n;
int rc;
+ EX_PRIVATE *exp;
NEEDFILE(sp, cmdp);
@@ -163,6 +164,12 @@
if (argv_exp1(sp, cmdp, p, STRLEN(p), 1))
return (1);
+ /* Set the last bang command */
+ exp = EXP(sp);
+ free(exp->lastbcomm);
+ exp->lastbcomm = v_wstrdup(sp, cmdp->argv[1]->bp,
+ cmdp->argv[1]->len);
+
/*
* Historically, vi waited after a write filter even if there
* wasn't any output from the command. People complained when
Home |
Main Index |
Thread Index |
Old Index