mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-14 18:05:27 +07:00
EA-243970 - temporal fix of the exception, the next step is formed in the issue IDEA-257176
GitOrigin-RevId: 441766dc858ed300ca319e832d8765ed01d3f3d3
This commit is contained in:
committed by
intellij-monorepo-bot
parent
9d873bed8b
commit
da98ddc2f0
@@ -70,9 +70,11 @@ class ShredManager {
|
||||
}
|
||||
|
||||
private int calculateElementOffset(@NotNull String text) {
|
||||
String cutText = text.substring(0, myPsiElement.getTextOffset());
|
||||
int offset = myPsiElement.getTextOffset();
|
||||
if (offset > text.length()) return -1;
|
||||
String cutText = text.substring(0, offset);
|
||||
String cutTextWithoutBogusWords = cutText.replaceAll(PSI_EXPR_MASK, "").replaceAll(PSI_CONDITIONAL_EXPR_MASK, "");
|
||||
return myPsiElement.getTextOffset() - (cutText.length() - cutTextWithoutBogusWords.length());
|
||||
return offset - (cutText.length() - cutTextWithoutBogusWords.length());
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
Reference in New Issue
Block a user