From 04cdbff23fa4e245d3f26ce5c4285b8b2e309bee Mon Sep 17 00:00:00 2001 From: "Gregory.Shrago" Date: Wed, 21 Nov 2012 16:54:54 +0400 Subject: [PATCH] drop intermediate content from history --- .../codeInsight/documentation/DocumentationComponent.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/documentation/DocumentationComponent.java b/platform/lang-impl/src/com/intellij/codeInsight/documentation/DocumentationComponent.java index a9fd8cc64659..98b12859bf09 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/documentation/DocumentationComponent.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/documentation/DocumentationComponent.java @@ -461,6 +461,12 @@ public class DocumentationComponent extends JPanel implements Disposable, DataPr if (clearHistory) clearHistory(); } + public void replaceText(String text, PsiElement element) { + if (element == null || getElement() != element) return; + setText(text, element, false); + if (!myBackStack.empty()) myBackStack.pop(); + } + private void clearHistory() { myForwardStack.clear(); myBackStack.clear();