Fixed AutocompleteManager breaking in findReceiverExpression if it contains quotes ""

This commit is contained in:
bigguy345 committed 2026-01-08 04:20:39 +02:00
1 parent e45f6b7da5
commit 9eb30f862a
1 file changed
+13
@@ -663,6 +663,19 @@ public class AutocompleteManager {
} else {
break;
}
} else if (c == '"' || c == '\'') {
// Skip over string literals
char quote = c;
start--;
while (start > 0) {
char strChar = text.charAt(start - 1);
if (strChar == quote && (start < 2 || text.charAt(start - 2) != '\\')) {
// Found unescaped closing quote
start--;
break;
}
start--;
}
} else if (Character.isJavaIdentifierPart(c) || c == '.') {
start--;
} else if (Character.isWhitespace(c)) {