Skip to content

Commit 8923a00

Browse files
committed
修复问题
1 parent eeb3747 commit 8923a00

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

CodeService/src/FormatElement/FormatContext.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ FormatContext::IndentState FormatContext::GetLastIndent() const
125125
{
126126
if (_indentStack.size() < 2)
127127
{
128-
return IndentState(0, 0, _options.indent_style);
128+
return IndentState{ 0, 0, _options.indent_style };
129129
}
130130

131131
return _indentStack[_indentStack.size() - 2];

CodeService/src/LuaFormatter.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,7 +1093,8 @@ std::shared_ptr<FormatElement> LuaFormatter::FormatCallArgList(std::shared_ptr<L
10931093
{
10941094
env->Add<KeepElement>(1);
10951095
}
1096-
else if (child->GetText() == "(" && _options.keep_one_space_between_call_args_and_parentheses
1096+
else if (child->GetText() == "("
1097+
&& _options.keep_one_space_between_call_args_and_parentheses
10971098
&& children.size() > 2)
10981099
{
10991100
env->Add<KeepElement>(1);
@@ -1189,8 +1190,9 @@ std::shared_ptr<FormatElement> LuaFormatter::FormatParamList(std::shared_ptr<Lua
11891190
}
11901191
else if (child->GetText() == ")")
11911192
{
1192-
paramListLayoutEnv->Add<TextElement>(child);
11931193
env->AddChild(paramListLayoutEnv);
1194+
env->Add<KeepElement>(0);
1195+
env->Add<TextElement>(child);
11941196
}
11951197
else
11961198
{

0 commit comments

Comments
 (0)