mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 23:37:32 +00:00
Fixed AutocompleteManager breaking in findReceiverExpression if it contains quotes ""
This commit is contained in:
1 parent
e45f6b7da5
commit
9eb30f862a
1 file changed
+13
+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)) {
|
||||
|
||||
Reference in new issue
Block a user