Skip to content

Commit f6feb51

Browse files
committed
修复诊断bug
1 parent 37714d0 commit f6feb51

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

CodeService/src/FormatElement/TextElement.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ void TextElement::Serialize(FormatContext& ctx, std::optional<FormatElement::Chi
2626
void TextElement::Diagnosis(DiagnosisContext& ctx, std::optional<FormatElement::ChildIterator> selfIt, FormatElement& parent)
2727
{
2828
const int character = ctx.GetColumn(_textRange.EndOffset);
29-
ctx.SetCharacterCount(character);
29+
ctx.SetCharacterCount(character + 1);
3030

3131
if (character > ctx.GetOptions().max_line_length)
3232
{

CodeService/src/LuaFormatter.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,12 +1000,12 @@ std::shared_ptr<FormatElement> LuaFormatter::FormatExpressionStatement(std::shar
10001000
env->AddChild(FormatNode(child));
10011001
break;
10021002
}
1003-
case LuaAstNodeType::Expression:
1004-
{
1005-
FormatExpression(child, env);
1006-
break;
1007-
}
1008-
// default 一般只有一个分号
1003+
// case LuaAstNodeType::Expression:
1004+
// {
1005+
// FormatExpression(child, env);
1006+
// break;
1007+
// }
1008+
// default 一般只有一个分号
10091009
default:
10101010
{
10111011
DefaultHandle(child, env);

0 commit comments

Comments
 (0)