Skip to content

Commit

Permalink
fix range format bug
Browse files Browse the repository at this point in the history
  • Loading branch information
CppCXY committed Nov 30, 2023
1 parent ff45297 commit 1b5763c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CodeFormatCore/src/RangeFormat/RangeFormatBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ void RangeFormatBuilder::CheckRange(LuaSyntaxNode &syntaxNode, const LuaSyntaxTr
switch (_validRange) {
case Valid::Init: {
auto tokenEndLine = endNode.GetEndLine(t);
if (tokenEndLine >= _range.StartLine) {
if (tokenEndLine >= _range.StartLine && tokenEndLine <= _range.EndLine) {
_validRange = Valid::Process;
auto tokenStartLine = startNode.GetStartLine(t);
if (tokenStartLine < _range.StartLine) {
Expand Down

0 comments on commit 1b5763c

Please sign in to comment.