diff --git a/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/IdeDocumentHistoryImpl.java b/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/IdeDocumentHistoryImpl.java index ad9fa350e42c..ca7dd78e1602 100644 --- a/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/IdeDocumentHistoryImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/IdeDocumentHistoryImpl.java @@ -355,13 +355,16 @@ public class IdeDocumentHistoryImpl extends IdeDocumentHistory implements Projec if (target == null) return; myForwardInProgress = true; - executeCommand(new Runnable() { - @Override - public void run() { - gotoPlaceInfo(target); - } - }, "", null); - myForwardInProgress = false; + try { + executeCommand(new Runnable() { + @Override + public void run() { + gotoPlaceInfo(target); + } + }, "", null); + } finally { + myForwardInProgress = false; + } } private PlaceInfo getTargetForwardInfo() {