EA-216299: fix SIOOBE in completion

This commit is contained in:
Yan Zhulanow
2019-11-13 20:10:38 +09:00
parent f75288b480
commit f91a84872a
@@ -47,8 +47,8 @@ class ToFromOriginalFileMapper private constructor(
init {
val originalText = originalFile.text
val syntheticText = syntheticFile.text
val originalSubSequence = originalText.subSequence(0, completionOffset)
val syntheticSubSequence = syntheticText.subSequence(0, completionOffset)
val originalSubSequence = originalText.take(completionOffset)
val syntheticSubSequence = syntheticText.take(completionOffset)
checkWithAttachment(originalSubSequence == syntheticSubSequence, {
"original subText [len: ${originalSubSequence.length}]" +
" does not match synthetic subText [len: ${syntheticSubSequence.length}]"