diff options
author | 2016-08-16 20:04:46 +0000 | |
---|---|---|
committer | 2016-08-16 20:04:46 +0000 | |
commit | cdc56b0e2ba4dd04377b120b19b0a3f13d1a3e29 (patch) | |
tree | 9e5a7c9a5033956dcb5e926c93bab3b58e2bac2b | |
parent | When the commit message is empty, don't default to c)ontinue (diff) | |
download | wireguard-openbsd-cdc56b0e2ba4dd04377b120b19b0a3f13d1a3e29.tar.xz wireguard-openbsd-cdc56b0e2ba4dd04377b120b19b0a3f13d1a3e29.zip |
Piping to a shell command does not count as a save, so don't reset the
modified flag.
from Jerome Frgacic (jerome.frgacic (at) yahoo.fr)
ok tb
-rw-r--r-- | bin/ed/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ed/main.c b/bin/ed/main.c index 1cf2e3249d2..1495c0beef2 100644 --- a/bin/ed/main.c +++ b/bin/ed/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.57 2016/03/22 17:58:28 mmcc Exp $ */ +/* $OpenBSD: main.c,v 1.58 2016/08/16 20:04:46 natano 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 @@ -859,7 +859,7 @@ exec_command(void) if ((addr = write_file(*fnp ? fnp : old_filename, (c == 'W') ? "a" : "w", first_addr, second_addr)) < 0) return ERR; - else if (addr == addr_last) + else if (addr == addr_last && *fnp != '!') modified = 0; else if (modified && !scripted && n == 'q') gflag = EMOD; |