Skip to content

Commit 12a4b64

Browse files
committed
Removed use of .shiftLeft due to version 173 requirement (#164)
1 parent eda630c commit 12a4b64

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/com/intellij/lang/jsgraphql/schema/SchemaIDLTypeDefinitionRegistry.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,9 @@ public TypeDefinitionRegistryWithErrors getRegistryWithErrors(PsiElement scopedE
162162
final PsiElement parent = error.getParent();
163163
if(parent instanceof GraphQLDirective) {
164164
// happens when typing '@' and the name of the directive is still missing
165-
final TextRange textRange = parent.getTextRange().shiftLeft(typeSystemDefinition.getTextRange().getStartOffset());
165+
final int delta = typeSystemDefinition.getTextRange().getStartOffset();
166+
final TextRange parentRange = parent.getTextRange();
167+
final TextRange textRange = new TextRange(parentRange.getStartOffset() - delta, parentRange.getEndOffset() - delta);
166168
if(!textRange.isEmpty()) {
167169
typeSystemDefinitionBuffer.replace(textRange.getStartOffset(), textRange.getEndOffset(), StringUtil.repeat(" ", textRange.getLength()));
168170
}

0 commit comments

Comments
 (0)