diff options
author | Omar Polo <op@cvs.openbsd.org> | 2023-04-28 10:02:04 +0000 |
---|---|---|
committer | Omar Polo <op@cvs.openbsd.org> | 2023-04-28 10:02:04 +0000 |
commit | 15ff45cb12933933993ea38f0e268ba458878cfc (patch) | |
tree | 1ec6cf4c141220c3347016d223ee8f8e3ad5bdbb /usr.bin/mg | |
parent | f91544512852883bec6df94ca5c0fec929c022bc (diff) |
fix lfindent (newline-and-indent) comment and description in the man page
for a while it has used only spaces when no-tab-mode is enabled and respected
the current buffer tab width.
Diffstat (limited to 'usr.bin/mg')
-rw-r--r-- | usr.bin/mg/mg.1 | 7 | ||||
-rw-r--r-- | usr.bin/mg/util.c | 8 |
2 files changed, 8 insertions, 7 deletions
diff --git a/usr.bin/mg/mg.1 b/usr.bin/mg/mg.1 index 3e9c59ad3ff..2387b29a106 100644 --- a/usr.bin/mg/mg.1 +++ b/usr.bin/mg/mg.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: mg.1,v 1.133 2023/04/28 09:50:50 op Exp $ +.\" $OpenBSD: mg.1,v 1.134 2023/04/28 10:02:03 op Exp $ .\" This file is in the public domain. .\" .Dd $Mdocdate: April 28 2023 $ @@ -760,8 +760,9 @@ Process a negative argument for keyboard-invoked functions. Insert a newline into the current buffer. .It Ic newline-and-indent Insert a newline, then enough tabs and spaces to duplicate the indentation -of the previous line. -Assumes tabs are every eight characters. +of the previous line, respecting +.Ic no-tab-mode +and the buffer tab width. .It Ic next-line Move forward .Va n diff --git a/usr.bin/mg/util.c b/usr.bin/mg/util.c index acb3714b28d..dd42085a24a 100644 --- a/usr.bin/mg/util.c +++ b/usr.bin/mg/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.49 2023/04/21 14:14:13 op Exp $ */ +/* $OpenBSD: util.c,v 1.50 2023/04/28 10:02:03 op Exp $ */ /* This file is in the public domain. */ @@ -363,9 +363,9 @@ doindent(int cols) /* * Insert a newline, then enough tabs and spaces to duplicate the indentation - * of the previous line. Assumes tabs are every eight characters. Quite - * simple. Figure out the indentation of the current line. Insert a newline - * by calling the standard routine. Insert the indentation by inserting the + * of the previous line, respecting no-tab-mode and the buffer tab width. + * Figure out the indentation of the current line. Insert a newline by + * calling the standard routine. Insert the indentation by inserting the * right number of tabs and spaces. Return TRUE if all ok. Return FALSE if * one of the subcommands failed. Normally bound to "C-m". */ |