mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 10:58:30 -05:00
fixed indexing and selection logic (#471)
This commit is contained in:
@@ -70,7 +70,7 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
|||||||
startLine,
|
startLine,
|
||||||
endLine,
|
endLine,
|
||||||
startColumn + 1,
|
startColumn + 1,
|
||||||
endColumn
|
endColumn + 1
|
||||||
);
|
);
|
||||||
|
|
||||||
batchDefinitionList.Add(batchDef);
|
batchDefinitionList.Add(batchDef);
|
||||||
@@ -98,7 +98,7 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
|||||||
startLine,
|
startLine,
|
||||||
endLine,
|
endLine,
|
||||||
startColumn + 1,
|
startColumn + 1,
|
||||||
endColumn
|
endColumn + 1
|
||||||
);
|
);
|
||||||
batchDefinitionList.Add(batch);
|
batchDefinitionList.Add(batch);
|
||||||
}
|
}
|
||||||
@@ -232,7 +232,7 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
|||||||
startLine,
|
startLine,
|
||||||
endLine,
|
endLine,
|
||||||
startColumn + 1,
|
startColumn + 1,
|
||||||
endColumn
|
endColumn + 1
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -280,7 +280,6 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
|||||||
// if there are more than one batch
|
// if there are more than one batch
|
||||||
for (int i = 0; i < n; i++)
|
for (int i = 0; i < n; i++)
|
||||||
{
|
{
|
||||||
endColumn = 0;
|
|
||||||
int ch;
|
int ch;
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
@@ -292,6 +291,7 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
|||||||
else if (ch == 10 /* for \n */) // End of line increase and break
|
else if (ch == 10 /* for \n */) // End of line increase and break
|
||||||
{
|
{
|
||||||
++endLine;
|
++endLine;
|
||||||
|
endColumn = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else // regular char just increase
|
else // regular char just increase
|
||||||
|
|||||||
Reference in New Issue
Block a user