aboutsummaryrefslogtreecommitdiff
path: root/lib/Format/Format.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Format/Format.cpp')
-rw-r--r--lib/Format/Format.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp
index 4128785f63..7f78ac0bcf 100644
--- a/lib/Format/Format.cpp
+++ b/lib/Format/Format.cpp
@@ -111,7 +111,10 @@ public:
Comments.back().Tok = Tok.FormatTok;
Comments.back().Spaces = Spaces;
Comments.back().NewLines = NewLines;
- Comments.back().MinColumn = WhitespaceStartColumn + Spaces;
+ if (NewLines == 0)
+ Comments.back().MinColumn = WhitespaceStartColumn + Spaces;
+ else
+ Comments.back().MinColumn = Spaces;
Comments.back().MaxColumn =
Style.ColumnLimit - Spaces - Tok.FormatTok.TokenLength;
return;