mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-20 05:19:41 +00:00
oops forgor
This commit is contained in:
1 parent
2c645beddf
commit
28761df3b2
1 file changed
+4
-4
@@ -22,9 +22,9 @@ public class ScriptLine {
|
||||
private static final char COLOR_CHAR = '\u00A7';
|
||||
|
||||
private final String text; // The actual text of this line
|
||||
private final int globalStart; // Start offset in the full document
|
||||
private final int globalEnd; // End offset in the full document (exclusive)
|
||||
private final int lineIndex; // 0-based line number
|
||||
public final int globalStart; // Start offset in the full document
|
||||
public final int globalEnd; // End offset in the full document (exclusive)
|
||||
public final int lineIndex; // 0-based line number
|
||||
|
||||
private final List<Token> tokens = new ArrayList<>();
|
||||
private final List<Integer> indentGuides = new ArrayList<>(); // Column positions for indent guides
|
||||
@@ -71,7 +71,7 @@ public class ScriptLine {
|
||||
|
||||
public Token getTokenAt(int globalPosition) {
|
||||
for (Token t : tokens) {
|
||||
if (globalPosition >= t.getGlobalStart() && globalPosition < t.getGlobalEnd()) {
|
||||
if (globalPosition >= t.getGlobalStart() && globalPosition <= t.getGlobalEnd()) {
|
||||
return t;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user