From 7ed649440f7e46738ea261a371ec115d3f1508fa Mon Sep 17 00:00:00 2001 From: Dmitry Batrak Date: Fri, 18 May 2018 12:27:00 +0300 Subject: [PATCH] IDEA-188770 folding marker popup sometimes doesn't disappear --- .../folding/impl/CodeFoldingManagerImpl.java | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/folding/impl/CodeFoldingManagerImpl.java b/platform/lang-impl/src/com/intellij/codeInsight/folding/impl/CodeFoldingManagerImpl.java index 411c3ccf263f..8c4fce986974 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/folding/impl/CodeFoldingManagerImpl.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/folding/impl/CodeFoldingManagerImpl.java @@ -1,6 +1,4 @@ -/* - * Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. - */ +// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.codeInsight.folding.impl; import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer; @@ -70,14 +68,15 @@ public class CodeFoldingManagerImpl extends CodeFoldingManager implements Projec @Override public void mouseMoved(EditorMouseEvent e) { if (myProject.isDisposed()) return; - HintManager hintManager = HintManager.getInstance(); - if (hintManager != null && hintManager.hasShownHintsThatWillHideByOtherHint(false)) { - return; - } - - if (e.getArea() != EditorMouseEventArea.FOLDING_OUTLINE_AREA) return; LightweightHint hint = null; try { + HintManager hintManager = HintManager.getInstance(); + if (hintManager != null && hintManager.hasShownHintsThatWillHideByOtherHint(false)) { + return; + } + + if (e.getArea() != EditorMouseEventArea.FOLDING_OUTLINE_AREA) return; + Editor editor = e.getEditor(); if (PsiDocumentManager.getInstance(myProject).isUncommited(editor.getDocument())) return;