diff options
Diffstat (limited to 'usr.bin/mg/util.c')
-rw-r--r-- | usr.bin/mg/util.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/mg/util.c b/usr.bin/mg/util.c index dd42085a24a..19b19a5b5a4 100644 --- a/usr.bin/mg/util.c +++ b/usr.bin/mg/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.50 2023/04/28 10:02:03 op Exp $ */ +/* $OpenBSD: util.c,v 1.51 2024/07/08 14:33:29 op Exp $ */ /* This file is in the public domain. */ @@ -354,9 +354,9 @@ doindent(int cols) if (curbp->b_flag & BFNOTAB) return (linsert(cols, ' ')); - if ((n = cols / 8) != 0 && linsert(n, '\t') == FALSE) + if ((n = cols / curbp->b_tabw) != 0 && linsert(n, '\t') == FALSE) return (FALSE); - if ((n = cols % 8) != 0 && linsert(n, ' ') == FALSE) + if ((n = cols % curbp->b_tabw) != 0 && linsert(n, ' ') == FALSE) return (FALSE); return (TRUE); } |