diff --git a/platform/lang-impl/src/com/intellij/codeInsight/hints/presentation/ChangeOnHoverPresentation.kt b/platform/lang-impl/src/com/intellij/codeInsight/hints/presentation/ChangeOnHoverPresentation.kt index 994c03c843c3..8196fba6316e 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/hints/presentation/ChangeOnHoverPresentation.kt +++ b/platform/lang-impl/src/com/intellij/codeInsight/hints/presentation/ChangeOnHoverPresentation.kt @@ -10,10 +10,9 @@ import java.awt.event.MouseEvent * @param onHoverPredicate predicate, that considers state is hovered (additional to fact, that it is in bounds) */ class ChangeOnHoverPresentation( - private val noHover: InlayPresentation, + val noHover: InlayPresentation, private val hover: () -> InlayPresentation, - private val onHoverPredicate: (MouseEvent) -> Boolean = { true }, - private val onMouseExited: () -> Unit = {} + private val onHoverPredicate: (MouseEvent) -> Boolean = { true } ) : StatefulPresentation(State(false), STATE_MARK) { override fun getPresentation(): InlayPresentation = when (state.isInside) { true -> hover() @@ -43,7 +42,6 @@ class ChangeOnHoverPresentation( if (state.isInside) { state = State(false) } - onMouseExited() } data class State(val isInside: Boolean) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/hints/presentation/PresentationFactory.kt b/platform/lang-impl/src/com/intellij/codeInsight/hints/presentation/PresentationFactory.kt index 1c525c349808..f3cfc425f2b8 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/hints/presentation/PresentationFactory.kt +++ b/platform/lang-impl/src/com/intellij/codeInsight/hints/presentation/PresentationFactory.kt @@ -245,9 +245,8 @@ class PresentationFactory(private val editor: EditorImpl) { fun changeOnHover( base: InlayPresentation, onHover: () -> InlayPresentation, - onHoverPredicate: (MouseEvent) -> Boolean = { true }, - onMouseExited: () -> Unit = {} - ): InlayPresentation = ChangeOnHoverPresentation(base, onHover, onHoverPredicate, onMouseExited) + onHoverPredicate: (MouseEvent) -> Boolean = { true } + ): InlayPresentation = ChangeOnHoverPresentation(base, onHover, onHoverPredicate) @Contract(pure = true) fun reference(base: InlayPresentation, onClickAction: () -> Unit): InlayPresentation {