From fb07cbcb4f1c3a6963d1646301ea17d4b82e5a53 Mon Sep 17 00:00:00 2001 From: Alex Plate Date: Tue, 20 Nov 2018 13:40:36 +0300 Subject: [PATCH] Fix small mistakes in compare text logic Existing text should be compared with expected text (and not original text) Review ID: IDEA-CR-40066 --- .../lang-impl/src/com/intellij/internal/retype/RetypeSession.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/lang-impl/src/com/intellij/internal/retype/RetypeSession.kt b/platform/lang-impl/src/com/intellij/internal/retype/RetypeSession.kt index 8e481af2e0a8..de68a2021826 100644 --- a/platform/lang-impl/src/com/intellij/internal/retype/RetypeSession.kt +++ b/platform/lang-impl/src/com/intellij/internal/retype/RetypeSession.kt @@ -196,7 +196,7 @@ class RetypeSession( while (i < text.length && j < expectedText.length) { while (i < text.lastIndex && isSkipped(text[i])) i++ while (j < expectedText.lastIndex && isSkipped(expectedText[j])) j++ - if (text[i] != originalText[j]) return false + if (text[i] != expectedText[j]) return false i++ j++ }