Skip to content

Commit

Permalink
Fix issue selecting element name on last offset
Browse files Browse the repository at this point in the history
  • Loading branch information
mickaelistria committed Sep 23, 2024
1 parent a3f6c8b commit 1277f1c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ public IJavaElement[] codeSelect(int offset, int length) throws JavaModelExcepti
impl.getElementInfo() instanceof AnnotatableInfo annotable &&
annotable.getNameSourceStart() >= 0 &&
annotable.getNameSourceStart() <= offset &&
annotable.getNameSourceEnd() >= offset) {
annotable.getNameSourceEnd() + 1 /* end exclusive vs offset inclusive */ >= offset) {
return new IJavaElement[] { currentElement };
}
if (insideComment) {
Expand Down

0 comments on commit 1277f1c

Please sign in to comment.