Skip to content

Commit 5e584c1

Browse files
committed
Fix caret OBE
1 parent 2c63b7b commit 5e584c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/club/bytecode/the/jda/gui/fileviewer/JDATextArea.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public void caretUpdate(CaretEvent e) {
5252
int cursorPos = e.getDot();
5353
int line = getLineOfOffset(cursorPos);
5454
for (Token t = getTokenListForLine(line); t != null; t = t.getNextToken()) {
55-
if (t.getOffset() <= cursorPos && t.getEndOffset() >= cursorPos) {
55+
if (t.getOffset() <= cursorPos && t.getEndOffset() > cursorPos) {
5656
currentlySelectedToken = new TokenWrapper(t);
5757
break;
5858
}

0 commit comments

Comments
 (0)