From aa2745f6ad32c32d78197e1cd777b3f4889dfbbb Mon Sep 17 00:00:00 2001 From: "Maxim.Mossienko" Date: Fri, 30 Sep 2016 16:36:10 +0200 Subject: [PATCH] IDEA-161826 Find and Replace keeps previous data in Replace field but it looks cleared --- .../src/com/intellij/find/SearchReplaceComponent.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/platform/lang-impl/src/com/intellij/find/SearchReplaceComponent.java b/platform/lang-impl/src/com/intellij/find/SearchReplaceComponent.java index b04c9d6f80c7..8415ee48db5a 100644 --- a/platform/lang-impl/src/com/intellij/find/SearchReplaceComponent.java +++ b/platform/lang-impl/src/com/intellij/find/SearchReplaceComponent.java @@ -347,6 +347,9 @@ public class SearchReplaceComponent extends EditorHeaderComponent implements Dat private void updateReplaceComponent(@NotNull String textToSet) { final int oldCaretPosition = myReplaceTextComponent != null ? myReplaceTextComponent.getCaretPosition() : 0; if (!updateTextComponent(false)) { + if (!myReplaceTextComponent.getText().equals(textToSet)) { + myReplaceTextComponent.setText(textToSet); + } return; } myReplaceTextComponent.setText(textToSet);