diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2021-04-13 15:34:42 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2021-04-13 15:34:42 +0000 |
commit | b0d45026da9c7d03ee9a2056a4c25ba91cc625f6 (patch) | |
tree | 7e12d3138238f691274ae83441139f28dd62a5b4 /usr.bin/vi | |
parent | 157d630e707d0095f41c1c55c76b9e54197ff2aa (diff) |
Ignore expandtab setting when in command mode.
Fixes things like searching for a literal tab character when
expandtab is enabled. From nvi2 (leres). OK martijn@
Diffstat (limited to 'usr.bin/vi')
-rw-r--r-- | usr.bin/vi/vi/v_txt.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/vi/vi/v_txt.c b/usr.bin/vi/vi/v_txt.c index 31ea4cba57c..d2745aeddb2 100644 --- a/usr.bin/vi/vi/v_txt.c +++ b/usr.bin/vi/vi/v_txt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: v_txt.c,v 1.34 2020/04/30 10:40:21 millert Exp $ */ +/* $OpenBSD: v_txt.c,v 1.35 2021/04/13 15:34:41 millert Exp $ */ /*- * Copyright (c) 1993, 1994 @@ -1214,7 +1214,8 @@ leftmargin: tp->lb[tp->cno - 1] = ' '; hexcnt = 1; goto insq_ch; case K_TAB: - if (quote != Q_VTHIS && O_ISSET(sp, O_EXPANDTAB)) { + if (sp->showmode != SM_COMMAND && quote != Q_VTHIS && + O_ISSET(sp, O_EXPANDTAB)) { if (txt_dent(sp, tp, O_TABSTOP, 1)) goto err; goto ebuf_chk; |