GP-4922 - Fixed exception in creating highlights

This commit is contained in:
dragonmacher 2024-09-16 11:52:41 -04:00
parent 7148590e5c
commit 26759777a9

View File

@ -288,7 +288,7 @@ abstract class DataTypeLocationDescriptor extends LocationDescriptor {
}
String variableName = paramParts[paramParts.length - 1];
int variableNameOffset = parameterDeclaration.indexOf(variableName);
int variableNameOffset = parameterDeclaration.lastIndexOf(variableName);
if (label.length() > variableNameOffset) {
return label.substring(0, variableNameOffset - 1); // -1 for the space before the name
}