mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
do not start a newline when next part is a closing parenthesis during
groupformatting
This commit is contained in:
parent
72914cc72d
commit
df07831d00
1 changed files with 5 additions and 2 deletions
|
|
@ -691,7 +691,10 @@ std::vector<std::string> PrettifyLineBuilder::createBasedOnGroups(
|
|||
else // same group
|
||||
{
|
||||
// only if we already had a different group split the line
|
||||
if ( groupdiffered )
|
||||
bool closing = false;
|
||||
if ( !part.text.empty() )
|
||||
closing = part.text[0] == ')'; // shouldnt force a new line
|
||||
if ( groupdiffered && !closing )
|
||||
{
|
||||
newline = false;
|
||||
stripline( line );
|
||||
|
|
@ -702,7 +705,7 @@ std::vector<std::string> PrettifyLineBuilder::createBasedOnGroups(
|
|||
}
|
||||
line += part.text;
|
||||
#ifdef DEBUG_FORMAT_BREAK
|
||||
INFO_PRINTLN( "same {} - {}", line, alignmentspace );
|
||||
INFO_PRINTLN( "same {} - {} {} {}", line, alignmentspace, groupdiffered, part.text );
|
||||
#endif
|
||||
if ( line.size() > compilercfg.FormatterLineWidth )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue