summaryrefslogtreecommitdiff
path: root/ex/ex_bang.c
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2026-01-14 14:57:09 +0100
committerBaptiste Daroussin <bapt@FreeBSD.org>2026-01-14 14:57:09 +0100
commit3110ba77506bf66eef114d123fd8d091d443316a (patch)
tree3e2e55d54796084a0bb75d6df87696c00a4afca9 /ex/ex_bang.c
parentae7f9696aefd6ce7b024af37c4d2c32f6783d106 (diff)
Vendor import nvi 2.2.2vendor/nvi/2.2.2vendor/nvi
Diffstat (limited to 'ex/ex_bang.c')
-rw-r--r--ex/ex_bang.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ex/ex_bang.c b/ex/ex_bang.c
index c5744708664a..08122f4173d2 100644
--- a/ex/ex_bang.c
+++ b/ex/ex_bang.c
@@ -174,8 +174,8 @@ ex_bang(SCR *sp, EXCMD *cmdp)
if (!F_ISSET(sp, SC_VI) && !F_ISSET(sp, SC_EX_SILENT))
(void)ex_puts(sp, "!\n");
- /* Apply expandtab to the new text */
- if (O_ISSET(sp, O_EXPANDTAB))
+ /* If addresses were specified, apply expandtab to the new text */
+ if (cmdp->addrcnt != 0 && O_ISSET(sp, O_EXPANDTAB))
ex_retab(sp, cmdp);
/*