From d53f2dcacb0ed0d66b8cf7abd2e245c59df03b13 Mon Sep 17 00:00:00 2001 From: Max Medvedev Date: Wed, 11 Feb 2026 18:33:39 +0100 Subject: [PATCH] IJPL-207762 shorten the code GitOrigin-RevId: 70b86783070f023d90514d26587e44c680d0b0b0 --- .../intellij/codeInsight/editorActions/TypedHandler.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/editorActions/TypedHandler.java b/platform/lang-impl/src/com/intellij/codeInsight/editorActions/TypedHandler.java index cbddd43253b5..21f021ef13c5 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/editorActions/TypedHandler.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/editorActions/TypedHandler.java @@ -273,12 +273,8 @@ public final class TypedHandler extends TypedActionHandlerBase { } private static void setTypedEvent(@NotNull Editor editor, char charTyped, @Nullable TypedEvent.TypedHandlerPhase phase) { - if (phase == null) { - editor.putUserData(CompletionPhase.AUTO_POPUP_TYPED_EVENT, null); - } - else { - editor.putUserData(CompletionPhase.AUTO_POPUP_TYPED_EVENT, new TypedEvent(charTyped, editor.getCaretModel().getOffset(), phase)); - } + TypedEvent event = phase == null ? null : new TypedEvent(charTyped, editor.getCaretModel().getOffset(), phase); + editor.putUserData(CompletionPhase.AUTO_POPUP_TYPED_EVENT, event); } @FunctionalInterface