From aa1c3a522c7fa7aef34215d29475eb6bf0dee489 Mon Sep 17 00:00:00 2001 From: "peter.gromov" Date: Thu, 21 Oct 2010 19:41:56 +0400 Subject: [PATCH] don't close lookup on typing during in-place rename --- .../codeInsight/template/impl/TemplateState.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/template/impl/TemplateState.java b/platform/lang-impl/src/com/intellij/codeInsight/template/impl/TemplateState.java index e79090729741..298b8601441d 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/template/impl/TemplateState.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/template/impl/TemplateState.java @@ -125,7 +125,17 @@ public class TemplateState implements Disposable { public void beforeCommandFinished(CommandEvent event) { if (started) { - afterChangedUpdate(); + Runnable runnable = new Runnable() { + public void run() { + afterChangedUpdate(); + } + }; + final LookupImpl lookup = (LookupImpl)LookupManager.getActiveLookup(myEditor); + if (lookup != null) { + lookup.performGuardedChange(runnable); + } else { + runnable.run(); + } } } };