Skip to content

Commit 1b5763c

Browse files
committed
fix range format bug
1 parent ff45297 commit 1b5763c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CodeFormatCore/src/RangeFormat/RangeFormatBuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ void RangeFormatBuilder::CheckRange(LuaSyntaxNode &syntaxNode, const LuaSyntaxTr
126126
switch (_validRange) {
127127
case Valid::Init: {
128128
auto tokenEndLine = endNode.GetEndLine(t);
129-
if (tokenEndLine >= _range.StartLine) {
129+
if (tokenEndLine >= _range.StartLine && tokenEndLine <= _range.EndLine) {
130130
_validRange = Valid::Process;
131131
auto tokenStartLine = startNode.GetStartLine(t);
132132
if (tokenStartLine < _range.StartLine) {

0 commit comments

Comments
 (0)