summaryrefslogtreecommitdiffstats
path: root/usr.bin/indent
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/indent')
-rw-r--r--usr.bin/indent/indent.15
-rw-r--r--usr.bin/indent/io.c3
2 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/indent/indent.1 b/usr.bin/indent/indent.1
index 1720c99..822f64f 100644
--- a/usr.bin/indent/indent.1
+++ b/usr.bin/indent/indent.1
@@ -34,7 +34,7 @@
.\" @(#)indent.1 8.1 (Berkeley) 7/1/93
.\" $FreeBSD$
.\"
-.Dd July 1, 1993
+.Dd Februrary 13, 2004
.Dt INDENT 1
.Os
.Sh NAME
@@ -196,7 +196,8 @@ lines will be indented that far from the beginning of the first line of the
statement. Parenthesized expressions have extra indentation added to
indicate the nesting, unless
.Fl \&lp
-is in effect.
+is in effect
+or the contination indent is exactly half of the main indent.
.Fl \&ci
defaults to the same value as
.Fl i .
diff --git a/usr.bin/indent/io.c b/usr.bin/indent/io.c
index 7af2d19..3a2eaf4 100644
--- a/usr.bin/indent/io.c
+++ b/usr.bin/indent/io.c
@@ -295,7 +295,8 @@ compute_code_target(void)
if (ps.paren_level)
if (!lineup_to_parens)
- target_col += continuation_indent * ps.paren_level;
+ target_col += continuation_indent
+ * (2 * continuation_indent == ps.ind_size ? 1 : ps.paren_level);
else {
int w;
int t = paren_target;
OpenPOWER on IntegriCloud