drop intermediate content from history

This commit is contained in:
Gregory.Shrago
2012-11-21 16:57:47 +04:00
parent 88fa8916bd
commit 04cdbff23f
@@ -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();